[development] formsapi question: saving additional fields' data
chris at tinpixel.com
Wed Apr 26 12:55:02 UTC 2006
Gordon Heydon wrote:
> On Tue, 2006-04-25 at 14:39 -0700, Nedjo Rogers wrote:
>>> You can add a #submit much like a #validate.
>> Thanks Earl!
>> Specifically (in case anyone else also missed this), you add an element to
>> the $form's #submit attribute array, with the key being the function to send
>> the form values to and the value being an array of arguments to use in
>> addition to the default ones. Example:
>> $form['#submit']['examplemodule_submit'] = array();
> Be aware that this will be the only hook_submit() that will be called.
> The default hook_submit() ($form_id .'_submit()') is only added when
> #submit is empty.
> I actually did a small tip about this yesterday. See
> http://heydon.com.au/node/926 for what I wrote.
Ah. Interesting. I had no idea. I've never needed it, but these kinds of
explanatory tips really need to be in the documentation.
And I've added your blog to my RSS reader, Gordon. :-)
More information about the development