function webform_client_form_validate in Webform 6.3
Same name and namespace in other branches
- 5.2 webform.module \webform_client_form_validate()
- 5 webform.module \webform_client_form_validate()
- 6.2 webform.module \webform_client_form_validate()
- 7.4 webform.module \webform_client_form_validate()
- 7.3 webform.module \webform_client_form_validate()
1 string reference to 'webform_client_form_validate'
- webform_client_form in ./webform.module
- Client form generation function. If this is displaying an existing
submission, pass in the $submission variable with the contents of the
submission to be displayed.
File
- ./webform.module, line 2099
Code
function webform_client_form_validate($form, &$form_state) {
$node = node_load($form_state['values']['details']['nid']);
$finished = $form_state['values']['details']['finished'];
if ($node->webform['total_submit_limit'] != -1) {
module_load_include('inc', 'webform', 'includes/webform.submissions');
if (!$finished && ($total_limit_exceeded = _webform_submission_total_limit_check($node))) {
theme('webform_view_messages', $node, 0, 1, 0, NULL, $total_limit_exceeded, array_keys(user_roles()), FALSE, FALSE);
form_set_error('', NULL);
return;
}
}
if ($node->webform['submit_limit'] != -1) {
module_load_include('inc', 'webform', 'includes/webform.submissions');
if (!$finished && ($user_limit_exceeded = _webform_submission_user_limit_check($node))) {
theme('webform_view_messages', $node, 0, 1, 0, $user_limit_exceeded, NULL, array_keys(user_roles()), FALSE, FALSE);
form_set_error('', NULL);
return;
}
}
_webform_client_form_validate($form, $form_state);
}