function webform_civicrm_form_alter in Webform CiviCRM Integration 6.2
Same name and namespace in other branches
- 8.5 webform_civicrm.module \webform_civicrm_form_alter()
- 6 webform_civicrm.module \webform_civicrm_form_alter()
- 7.5 webform_civicrm.module \webform_civicrm_form_alter()
- 7 webform_civicrm.module \webform_civicrm_form_alter()
- 7.2 webform_civicrm.module \webform_civicrm_form_alter()
- 7.3 webform_civicrm.module \webform_civicrm_form_alter()
- 7.4 webform_civicrm.module \webform_civicrm_form_alter()
Implements hook_form_alter().
File
- ./
webform_civicrm.module, line 56 - Webform CiviCRM Integration Module: Links webform submissions to contacts in a CiviCRM database. @author Coleman Watts
Code
function webform_civicrm_form_alter(&$form, &$form_state, $form_id) {
// Alter back-end webform component edit forms
if ($form_id == 'webform_component_edit_form' && substr($form['form_key']['#default_value'], 0, 7) == 'civicrm') {
module_load_include('inc', 'webform_civicrm', 'webform_civicrm_admin');
_webform_civicrm_webform_component_form_alter($form, $form_state);
}
elseif (strpos($form_id, 'webform_client_form_') !== FALSE && !empty($form['#node']->webform_civicrm)) {
module_load_include('inc', 'webform_civicrm', 'webform_civicrm_forms');
_webform_civicrm_webform_frontend_form_alter($form, $form_state);
}
}