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
  • 1
    This is difficult issue to help you with if you're not providing any code or a specific context.
    – chrisjlee
    Commented Aug 19, 2011 at 17:32

2 Answers 2

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.
1
  • Also sometimes while putting dpm() in theme part, it may not be executed while kpr() will.
    – tostinni
    Commented Aug 21, 2011 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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