You are here

function clientside_validation_webform_after_build in Clientside Validation 7

Same name and namespace in other branches
  1. 6 clientside_validation.module \clientside_validation_webform_after_build()

Webform.

1 string reference to 'clientside_validation_webform_after_build'
clientside_validation_form_alter in ./clientside_validation.module
Implements hook_form_alter().

File

./clientside_validation.module, line 316
Add client side validation to forms.

Code

function clientside_validation_webform_after_build(&$form, &$form_state) {
  $js_rules = array();
  clientside_validation_settings_current_form($form['#clientside_validation_settings']);
  drupal_alter("clientside_validation_webform", $form, $form_state, $js_rules);
  if (!empty($js_rules)) {
    $settings = array();
    _clientside_validation_add_general_settings($settings, $form);
    _clientside_validation_add_special_rules($js_rules, $settings, $form);
    clientside_validation_add_js_settings($settings);
  }
  return $form;
}