function webform_form_submit in Webform 6.2
Same name and namespace in other branches
- 5.2 webform.module \webform_form_submit()
- 6.3 webform.module \webform_form_submit()
- 7.4 webform.module \webform_form_submit()
- 7.3 webform.module \webform_form_submit()
Submit handler for the webform node form.
Redirect the user to the components form on new node inserts. Note that this fires after the hook_submit() function above.
1 string reference to 'webform_form_submit'
- webform_form_alter in ./
webform.module - Implementation of hook_form_alter().
File
- ./
webform.module, line 1057
Code
function webform_form_submit($form, &$form_state) {
$nid = $form_state['nid'];
// Remove the the submitted message added by node module.
unset($_SESSION['messages']['status']);
drupal_set_message(t('The new webform %title has been created. Add new fields to your webform with the form below.', array(
'%title' => $form_state['values']['title'],
)));
if (!$form_state['values']['status']) {
drupal_set_message(t('This webform is currently unpublished. After finishing your changes to the webform, use the <em>Publish</em> button below.'));
}
$form_state['redirect'] = 'node/' . $nid . '/edit/components';
}