function webform_civicrm_add_js in Webform CiviCRM Integration 6.2
Same name and namespace in other branches
- 7.2 webform_civicrm_d7_functions.inc \webform_civicrm_add_js()
Compatibility wrapper for drupal_add_js()
3 calls to webform_civicrm_add_js()
- webform_civicrm_configure_form_builder in ./
webform_civicrm_admin.inc - Form to configure CiviCRM options for a Webform Called indirectly from hook_menu() for D7-D6 compatibility
- _webform_civicrm_webform_component_form_alter in ./
webform_civicrm_admin.inc - Alter back-end webform component edit forms. Called by hook_form_alter() whenever editing a webform component.
- _webform_civicrm_webform_frontend_form_alter in ./
webform_civicrm_forms.inc - Alter front-end of webforms: Called by hook_form_alter() when rendering a civicrm-enabled webform Add custom prefix. Display messages. Block users who should not have access. Set webform default values.
File
- ./
webform_civicrm_d6_functions.inc, line 79 - Keep all functions specific to a version of Drupal here, to allow the rest of the code to be version-independent.
Code
function webform_civicrm_add_js($js, $type = 'file', $scope = 'header') {
if ($type == 'file') {
$js = drupal_get_path('module', 'webform_civicrm') . '/' . $js;
}
drupal_add_js($js, $type, $scope);
}