I just enabled the devel module on Drupal 6 and using dpm($form) was showing values for me but it does not show values any more. What would mostly the issue here? Is there a way to see those values?

Thanks

link|improve this question

57% accept rate
1  
This is difficult issue to help you with if you're not providing any code or a specific context. – chrisjlee Aug 19 '11 at 17:32
feedback

2 Answers

up vote 0 down vote accepted

Typical cases for why a dpm(...) doesn't show up:

  • Cache: The dpm() is in some cached code and is not actually being executed.
  • Access: You are viewing the page with a user that doesn't have access to see the debug messages.
  • Ajax/etc: Some code clears the messages before they are rendered, in this case you can use dd() to print to a log file instead.
link|improve this answer
Also sometimes while putting dpm() in theme part, it may not be executed while kpr() will. – tostinni Aug 21 '11 at 16:06
feedback

In say a validation function, to see both the $form structure and what the user has entered, use a devel debug statement like:

dpm(array('$form' => $form, '$form_state' => $form_state), "Validation debug");

The $form_state['values'] array will contain the raw user entries you can then access and validate.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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