Hi, In drupal 6 used to have $output = ''; $output .= drupal_get_form('my_form', $arg1); Not I find I need $output .= drupal_render((drupal_get_form('my_form', $arg1)); However it not longer passed arg1 to the form. Any ideas Regards, Iain
Hi Use func_get_args() to check whick arg the value us being past. The for args have changes so you may bit be looking in the right place. Gordon Sent from my iPhone On 25/04/2011, at 2:49 PM, Iain Wiseman <iwiseman@bibble.co.nz> wrote:
Hi,
In drupal 6 used to have $output = ''; $output .= drupal_get_form('my_form', $arg1);
Not I find I need
$output .= drupal_render((drupal_get_form('my_form', $arg1));
However it not longer passed arg1 to the form.
Any ideas
Regards, Iain
In Drupal 7 you avoid rendering; you do *not* render a form after calling drupal_get_form(). You return the render array that it creates. Please take a look at the form_example in Examples for more help. You may also be interested in the render_example. -Randy On Sun, Apr 24, 2011 at 10:40 PM, Iain Wiseman <iwiseman@bibble.co.nz>wrote:
Hi,
In drupal 6 used to have $output = ''; $output .= drupal_get_form('my_form', $arg1);
Not I find I need
$output .= drupal_render((drupal_get_form('my_form', $arg1));
However it not longer passed arg1 to the form.
Any ideas
Regards, Iain
-- Randy Fay Drupal Module and Site Development randy@randyfay.com +1 970.462.7450
On 25/04/11 18:02, Randy Fay wrote:
In Drupal 7 you avoid rendering; you do *not* render a form after calling drupal_get_form(). You return the render array that it creates Please take a look at the form_example in Examples for more help.
You may also be interested in the render_example.
Thanks, Found the tutorial and got my first module up and running with a form. I am trying to port a module from no knowledge of drupal so as you can imagine it is not straight forward. I think overlay is new in drupal 7 so trying to present user settings based on the result of a callback.
participants (4)
-
Gordon Heydon -
Iain william Wiseman -
Iain Wiseman -
Randy Fay