You are here

function webform_civicrm_webform_component_presave in Webform CiviCRM Integration 7.2

Same name and namespace in other branches
  1. 8.5 webform_civicrm.module \webform_civicrm_webform_component_presave()
  2. 6.2 webform_civicrm.module \webform_civicrm_webform_component_presave()
  3. 7.5 webform_civicrm.module \webform_civicrm_webform_component_presave()
  4. 7.3 webform_civicrm.module \webform_civicrm_webform_component_presave()
  5. 7.4 webform_civicrm.module \webform_civicrm_webform_component_presave()

Implements hook_webform_component_presave(). Alter form keys when cloning a contact.

File

./webform_civicrm.module, line 323
Webform CiviCRM Integration Module: Links webform submissions to contacts in a CiviCRM database. @author Coleman Watts

Code

function webform_civicrm_webform_component_presave(&$component) {
  if ($c = webform_civicrm_contact_clone_storage()) {
    $component['form_key'] = str_replace($c['old'], $c['new'], $component['form_key']);
  }
}