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

Karoly Negyesi karoly at negyesi.net
Thu Dec 7 04:36:57 UTC 2006


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

If this is what you want then indeed you need two steps. As you have not outlined what do you want to do with the form, I can't really guess a better way. Maybe you want to do

$form = drupal_retrieve_form($form_id);
drupal_prepare_form($form_id, $form);

or even drupal_process_form($form_id, $form);

Eaton did a very good job in slicing up the form workflow steps into separate functions -- but if you want half of a step, then you indeed need do it for yourself.


More information about the development mailing list