... and it helped a little. But I'm building a small form in a block, and I don't know how to process the submitted form and still remain in the (updated) block.
Do you mean that, once a form passes validation (your_form_id_validate()), and is submitted (your_form_id_submit()), you want to show the form again, but retain the submitted values as "default" in the new form? Is this correct?
If this is what you are trying to do, then the easiest thing would be to use session variables. That is, when the form is created, give it a default value to each element based on the presence of a corresponding session variable. When the form is submitted, update the session variables to reflect the new values. By default, all forms return to the page from which they were submitted, so Drupal takes care of showing the form again.
Comments
what aspect of form
what aspect of form processing are you looking for? and have you seen this page: http://api.drupal.org/api/file/developer/topics/forms_api.html/6 ?
- Corey
Yeah, I saw that...
... and it helped a little. But I'm building a small form in a block, and I don't know how to process the submitted form and still remain in the (updated) block.
Do you mean that, once a
Do you mean that, once a form passes validation (
your_form_id_validate()), and is submitted (your_form_id_submit()), you want to show the form again, but retain the submitted values as "default" in the new form? Is this correct?If this is what you are trying to do, then the easiest thing would be to use session variables. That is, when the form is created, give it a default value to each element based on the presence of a corresponding session variable. When the form is submitted, update the session variables to reflect the new values. By default, all forms return to the page from which they were submitted, so Drupal takes care of showing the form again.
- Corey
Form in a block...
Hi!
I'm looking for some tutorial/code details for putting such a form in a block... do you know where i can find this?
Thanks,
Matt
_
Search is a beautiful thing:
http://drupal.org/search/apachesolr_search/form%20block (first link).