I'm working on a Drupal 7 portal. I added a custom field to the registration form and I would like to get hold of custom field value when the registration form is submitted and before it is stored in the database.
I'm trying to use the submission handler for the registration form and print the content of $form
and $form_state
, but those values never get printed as message. I installed the Devel module as well.
function user_register_form_submit($form, &$form_state) {
drupal_set_message('<pre>'. print_r($form, 1) .'</pre>');
drupal_set_message('<pre>'. print_r($form_state, 1) .'</pre>');
drupal_set_message(t('An info message from user_register_form_submit'), 'error');
}
I appreciate any input on what the issue could be.