I'm trying to customize some forms, but first I need to see what all the variables are. But I can't figure out how to print them. For some reason that I don't understand, the $form array just doesn't exist on my page, despite there being a node form on my page. I've tried a variety of things, but they all revolve around printing it in page.tpl.php (for the moment). I saw something in the themeing section about overriding $form values and such but it's for 5.x and doesn't seem to be what I'm looking for. Am I missing something here?

Comments

WorldFallz’s picture

Have you seen Fine-tuning the UI by Theming Forms In Drupal 6.0?

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

xmacinfo’s picture

The Devel or Developer module should be what you are looking for.

http://drupal.org/project/devel

attentat’s picture

I can never get the first link to work (I've tried on three occasions) and devel works great... except on the node add/edit pages.

Any other thoughts?

I'm a little lost after using 5.x for a while where my template.php had access to $form. With 6.x, I can't even figure out what has access to $form.

WorldFallz’s picture

I can never get the first link to work

Try accessing it via http://drupal.org/node/290431 instead. It really does contain what you need to know, and rewriting in a post would not only be a waste of time, but far less useful then the screencast demo.

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

paulbhartzog’s picture

it's nice to see so many non-answers to a simple question....

so how does one print out ANY or ALL variables from an incoming form in drupal 6?

ronline’s picture

  print '<pre>';
  var_dump(get_defined_vars()); 
print '</pre>';
bigheadfish’s picture

too.

cannot print out form variables

somtam’s picture

Because usually to see what is inside a variable I use Devel... but for the user login cannot, because if I'm logged in there's no form!
thanks!