Hi everyone,
I'm a belgian newbie, and i nedd your help.
I'm stuck with my multi step form.
1) i can't get the right default value form a select when i get to the next step and then go back to the previous one. The value of the select get back with the first one.
I tried:
'#default_value' => empty($form_state['values']['step4'][$i]['project_fieldset']['name']) ? '' : $form_state['values']['step4'][$i]['project_fieldset']['name']
or
'#value' => empty($form_state['values']['step4'][$i]['project_fieldset']['name']['#value']) ? '' : $form_state['values']['step4'][$i]['project_fieldset']['name']['#value']
or even
'#default_value' => empty($form_state['values']['step4'][$i]['project_fieldset']['name']['#default_value']) ? '' : $form_state['values']['step4'][$i]['project_fieldset']['name']['#default_value']
I don't understand...
2) same proble with files and checkboxes
thanks in advance
Comments
I have to say that i built my
I have to say that i built my multi step with the Ajax Multi Step forms examples
Nobody use a multi step form
Nobody use a multi step form and want to keep data when going on a previous step?
CTools module
has a caching feature which seems to be aimed at this sort of thing. You have to keep the data somewhere, I don't think the forms api will do this automatically for you.
www.purpleoar.co.nz/scryptik - Javascript editor with syntax error checking
www.purpleoar.co.nz - Web development, Drupal consultancy