1

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

  • 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
1

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.
| 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
1

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.

| improve this answer | |

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.