[development] getting the full $form in 5.x

Peter Wolanin pwolanin at gmail.com
Wed Dec 6 20:01:24 UTC 2006


Maybe I'm missing something obvious, but is there a simple way in
Drupal 5.x to get the full form corresponding to a particular form ID?
 Specifically, I want to have the $form with all the elements added
via hook_form_alter, but without rendering the $form.

Looks like I might have to do it in 2 steps:

$form = drupal_retrieve_form('myformid')
  foreach (module_implements('form_alter') as $module) {
    $function = $module .'_form_alter';
    $function('myformid', $form);
  }


Thanks,

Peter


More information about the development mailing list