function wfm_js in Webform Multiple (WFM) 7
AJAX callback for the 'Add another item' or 'Remove' buttons.
1 string reference to 'wfm_js'
- _wfm_process_elements in ./
wfm.module - Process an element in the Webform to allow multiple values.
File
- ./
wfm.module, line 395 - Main module file for Webform Multiple (WFM).
Code
function wfm_js($form, $form_state) {
// No need to do anything here, just return the (possibly changed) element.
$button = $form_state['triggering_element'];
$element = drupal_array_get_nested_value($form, array_slice($button['#array_parents'], 0, -1));
return $element;
}