[development] Form Api - Passing arguments to a form

Robert Wohleb rwohleb at techsanctuary.com
Sun Jul 26 22:21:04 UTC 2009


The FAPI quick-start guide covers this, and some of the other changes.
http://api.drupal.org/api/file/developer/topics/forms_api.html/6

<http://api.drupal.org/api/file/developer/topics/forms_api.html/6>~Rob

On Sun, Jul 26, 2009 at 2:10 PM, Jamie Holly <hovercrafter at earthlink.net>wrote:

> Drupal passes a form_state variable to the function first, so you need:
>
> function mymodule_form($form_state, $arguments_array) {
>
>
>
> Jamie Holly
> http://www.intoxination.net http://www.hollyit.net
>
>
>
>
> Joop Sint Jago wrote:
>
>>
>> Hello,
>>
>> I have searched d.org but cannot find the answer.
>>
>> I’m converting a D5 module to D6, but cannot succeed into passing some
>> arguments when calling the form.
>>
>> $output = drupal_get_form(‘mymodule_form’, $arguments_array);
>>
>> function mymodule_form($arguments_array) {
>>
>> //
>>
>> ‘#defualt_value’ => $arguments_array[‘name’],
>> //
>>
>> }
>>
>> If I’m not mistaken nothing changed at this point with D6.
>>
>> Thanks.
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.drupal.org/pipermail/development/attachments/20090726/5ede0648/attachment.htm>


More information about the development mailing list