Hi,
I cannot seem to get the wizard example to work for me. I am using Drupal 7, with a few modules installed, but nothing that should drastically interfere with the forms api.
If I enter data into the first form page, go to the next form and then go back to the first (click next, then previous), the data is stored. However, if I then go forward to the second form again, the data from the second form is not there. This also seems to be the case with the third form - generally, going backwards loads saved data, but going backwards and then forwards does not. My reading of the code could be wrong, but it seems like it should save it both ways?
It almost seems as if the next submit wipes the saved form values or something?
Cheers,
Peter
Comments
Comment #1
rfayThe *back* submit wipes the form values because it uses
That allows skipping all validation, but also throws out all data.
This was a change made for security reasons late in the D7 cycle. You can work around it if you *validate* things in a form before letting them go back. It's kind of counterintuitive though for a user, because they figure when going back that they shouldn't have to fill in required fields, etc.
Does that answer your question?
Comment #2
ph352 commentedAh, I see - I had misinterpreted the comment around that section of code. Thanks for the help..
Peter
Comment #3
n20 commentedCould you provide an example for how the validation should look like? I added a hook__validate() but the behavior is the same as described by ph352.
cheers, N20