You are here

function webform_client_form_process in Webform 7.4

Process function for webform_client_form().

Include all the enabled components for this form to ensure availability. Also adds the pre- and post-validators to ensure that hook_form_alters don't add their validation functions in the wrong order.

1 string reference to 'webform_client_form_process'
webform_client_form in ./webform.module
Client form generation function.

File

./webform.module, line 2803
This module provides a simple way to create forms and questionnaires.

Code

function webform_client_form_process($form, $form_state) {
  $components = webform_components();
  foreach ($components as $component_type => $component) {
    webform_component_include($component_type);
  }

  // Add the post validation to end of validators. Do this first on the off
  // chance that an _alter function has unset form['#validate'].
  $form['#validate'][] = 'webform_client_form_postvalidate';

  // Add the pre-validator to the front of the list to run first.
  array_unshift($form['#validate'], 'webform_client_form_prevalidate');
  return $form;
}