function clientside_validation_form_after_build_recurse in Clientside Validation 7.2
Same name and namespace in other branches
- 8.2 clientside_validation.module \clientside_validation_form_after_build_recurse()
- 8 clientside_validation.module \clientside_validation_form_after_build_recurse()
- 6 clientside_validation_form/clientside_validation_form.module \clientside_validation_form_after_build_recurse()
- 7 clientside_validation_form/clientside_validation_form.module \clientside_validation_form_after_build_recurse()
- 3.0.x clientside_validation.module \clientside_validation_form_after_build_recurse()
- 2.0.x clientside_validation.module \clientside_validation_form_after_build_recurse()
1 call to clientside_validation_form_after_build_recurse()
- clientside_validation_form_after_build in ./
clientside_validation.module - Regular form.
File
- ./
clientside_validation.module, line 346 - Add client side validation to forms.
Code
function clientside_validation_form_after_build_recurse($form_id, &$form, &$form_state) {
$validation_added = FALSE;
if ($children = element_children($form)) {
foreach ($children as $item) {
$element =& $form[$item];
$validation_added = clientside_validation_add_validation($element, $form_state, $form_id) || $validation_added;
if (isset($element['#type']) && $element['#type'] == 'submit' && isset($element['#limit_validation_errors']) && empty($element['#limit_validation_errors']) && $element['#limit_validation_errors'] !== FALSE) {
$element['#attributes']['class'][] = 'cancel';
}
$validation_added = clientside_validation_form_after_build_recurse($form_id, $element, $form_state) || $validation_added;
}
}
return $validation_added;
}