[development] finding the $form_id of a particular form / all
drupal at oadae.net
Sat Jul 1 14:14:18 UTC 2006
On Saturday 01 July 2006 03:05, Augustin (a.k.a. Beginner) wrote:
> hook_form_alter() allows us to change forms according to their form_id:
> Am I missing something easy, or the only way to figure out what is the
> form_id of a specific form is to pour over the code and figure out which
> module initialized the said form?
> Devel.module doesn't seem to help with that.
Heh, I hit this just yesterday. While my solution probably wasn't "correct",
it worked for me. I just put a "print ($form_id);" as the first statement of
my custom form_alter function, then I navigated to the form I wanted the ID
for, and it was the first thing printed at the top of the page.
Father of Six: http://www.flattfamily.com/ (Joseph, 13; Cramer, 11; Travis,
9; Angela; Harry, 5; and William, 12:04 am, 12-29-2005)
Linux User: http://www.sourcemage.org/
Drupal Fanatic: http://drupal.org/
More information about the development