function webform_conditional_add_js in Webform Conditional (Same Page Conditionals) 6
Same name and namespace in other branches
- 7 webform_conditional.module \webform_conditional_add_js()
Function run #after_build on webform. This ensures that Javascript is added even if form is built from cache.
_state
Parameters
array $form:
Return value
array The form
1 string reference to 'webform_conditional_add_js'
File
- ./
webform_conditional.module, line 263 - This module adds the ability to have hidden conditional fields on Webforms. It requires the Webform module version 3.x
Code
function webform_conditional_add_js(&$form, $form_state) {
drupal_add_js(array(
'webform_conditional' => $form['#webform_conditional_js'],
), "setting");
drupal_add_js(drupal_get_path('module', 'webform_conditional') . '/webform_conditional.js');
return $form;
}