Hi all,
This question must have come up before but I cannot find an answer for it by searching. I'll try to make this as clear as possible...
My module page is accessed by
/?q=add
on this page the user is presented with a form (1 text field and submit), when submitting this form a second form is generated, the value they entered in the first form is to become a default value for a field in the next. This all works fine so far.
The function that generates the first form is called: mymodule_add , and the function that recieves the form back to evaluate is called: mymodule_add_submit . This function gets the form fine and I can process the data contained within it, and generate the second form.
The second form is called mymodule_save and the function to recieve the form called mymodule_save_submit. But when this form is submitted I am taken back to the first form, drupal does not send the second submitted form to it's function.
I have tested the second function by having the first form submit to it (and output some verification data) just to see it works, and it does.
Does this have something to do with the callback for this URL (/?q=add) being the function that generates the first form? - shouldn't drupal check for the _submit function and go their first anyway?
I can not see anyway there can be multiple forms to be generated and submitted via the same URL.