Can't get values from $form in submit handler? Using Drupal 7 and a custom form generated with the Webform module, I'm trying to get info from the submitted form to save in additional SQL tables.

I know my submit handler is being called because putting dpm('This is great news, our submit handler is being called!'); inside the submit handler gives the expected output. So does dpm($myvariable); (after setting a value for $myvariable).

But dpm($form); not only doesn't return anything, but also seems to preven the other dpm() functions from working. There are no errors logged, and the page loads otherwise normally.

I should also mention that if I put the dpm($form) in the hook_form_alter() function instead of the submit handler, it does show up, but all values appear to be default or empty, after the form is submitted.
Please check your submit handler signatures once ... Ideally submit function should be something like below... You can try using drupal set message for same like code given below !

function form_example_tutorial_7_submit($form, &amp;$form_state) {
  drupal_set_message("I am inside submit handler. Printed form values below");
  drupal_set_message("&lt;pre&gt;" . print_r($form_state['values'], 1) . "&lt;/pre&gt;");
  // $form_state['values'] is used to extract submitted values !
  drupal_set_message("Printing Form Structure Below !");
  drupal_set_message("&lt;pre&gt;" . print_r($form, 1) . "&lt;/pre&gt;");
}