How do I get the list of fields present in a certain form, I know the form id, I just need the names of the fields present in that form ?
1 Answer
go to your template "template.php for example" or your module, and use
hook_form_alter(&$form, &$form_state, $form_id){ var_dump($form);exit(); }
and you will get very detailed look at your form
-
That would also give me other things like
actions
,submit
etc. But I just need the field names.– user2948Commented Mar 12, 2012 at 15:05 -
try dumping the other variables "form_state" and "form_id" usually they have them.– saadluluCommented Mar 12, 2012 at 21:39