On Wed, 6 Feb 2008 14:15:27 +0100 Ivan Sergio Borgonovo mail@webthatworks.it wrote:
_submit and _validate get the form in a ordinate way... but they don't output anything on screen.
Suppose I want to do something as stupid as multiplying 2 fields and return the output on screen without having to save the 2 fields somewhere... as if _submit was not going to return a path but just use $form_values in spite of $_POST and output something...
I gave a look at how search works and at a quick glance it looks not suited. Up to my understanding it parse keys and then _submit append it to a url.
I tried to play a bit with multistep forms since it looks as the only system to have $form_values back into the form generating function.
So the form function change it's output according to the received $form_values. I know _validate get called, but it seems that form_set_values() inside _validate has no effect on the values received by the form generating function.
Not that I really need to use form_set_value... but just for better understanding of how things work...
Another thing I don't need now but that is out of my understanding is how to succeed in getting the $form_values in the form generating function *and* execute the _submit hook.
If the form is multistep, it doesn't fire the _submit hook so I'd be curious to know how you could have the $form_values *and* fire the _submit without the need to load what you submitted from the DB/session/whatever.
thx