The sample shows here seems to indicate you can pass parameter with form #redirect. http://api.drupal.org/api/file/developer/topics/forms_api_reference.html...

$form['#redirect'] = array('user/login', 'destination=node');

If I have
$form['#redirect'] = array('mypage', 'myparameter'),

does that mean I can pick up 'myparameter' in 'mypage'? How?

thx for help!

Comments

ram_segal’s picture

Hi,

Use drupal_goto() instead, you can pass queries there...

dman’s picture

This is an unexpected use of the redirect function, and probably unsupported, but just from looking at the code I'd try

$form['#redirect'] = array('mypage', 'myparameter=myval'), 

destination is a special var, but seeing as it just gets passed as an URL argument, the same trick MAY allow other vars through.
However, because destination is a special known case that gets looked after - it's possible that your data will NOT be kept after a few redirects - unless you actually make sure to hang onto it in a hidden field in your form or something.

newbuntu’s picture

thanks for both of your responses.
I used session to pass the extra parameter.