By errorist on
I have some dropdown lists on my page with multiple selection on. I want that after form submission, the options selected in the list should remain selected.
I know I have to use $form_state variable... but I don't know how to use it and where to use this variable.
Help please...
Comments
set up the "default_value" for the initial selection
when you do a "print_r($form_state,TRUE)" you will see the contents of the variable in human readable form. It's quite easy to read! And it reflects the form content enriched by the actual input.
Now take the actual value from $form_state and put it into the forms fields "#default_value" using
function "set_form_field".