function wfm_form_webform_client_form_alter in Webform Multiple (WFM) 7
Implements hook_form_FORM_ID_alter().
File
- ./
wfm.module, line 93 - Main module file for Webform Multiple (WFM).
Code
function wfm_form_webform_client_form_alter(&$form, &$form_state) {
// Process form elements so that they can have multiple instances.
$form_keys = element_children($form['submitted']);
foreach ($form_keys as $form_key) {
_wfm_process_elements($form['submitted'][$form_key], $form_state, $form['#submission']);
}
// Add WFM's validation handler, to replace Webform's own.
$key = array_search('webform_client_form_validate', $form['#validate']);
unset($form['#validate'][$key]);
$form['#validate'][] = 'wfm_validate';
}