[development] Form Api - Passing arguments to a form

Jamie Holly hovercrafter at earthlink.net
Sun Jul 26 21:10:55 UTC 2009


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.
>


More information about the development mailing list