Accessing value of form fields for redirect

I have a simple form with two fields:
$form = $app->add('Form');
$f1 = $form->addField('field1');
$f2 = $form->addField('field2');

Now I want to redirect on a second page with parameters from the fields added to the url. But I can’t get that to work.
I tried:
$form->add(['Button', 'Redirect'])->on('click', $app->jsRedirect(['check','am'=>$field->jsInput()->val()]));
or anything else…
Could anybody provide me with some pointers?

`

Hello, did you try passing the url parameters as an array in the second parameter of jsRedirect() ? Like this $form->add(['Button', 'Redirect'])->on('click', $app->jsRedirect('check',['am'=>$field->jsInput()->val()]));