0

When writing modules, especially in the "hook_form _alter" hook, I find myself in the same situation many times:

I want to control some $form fields and I'm searching the field ID, the right attribute convention, etc.

I'm trying to print all the fields and their attributes to the output page so I could do that every time I need information about a form fields.

  1. How can I print all the fields complete attributes?
  2. I need to stick it temporarily in the page - how can I send the details to the page (I don't know what are the fields ID's...)?
0

Devel - Helper functions for Drupal developers and inquisitive admins.

Add in hook_form_alte function dsm($form); and refresh your form page, you will get message with structured info.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.