function wf_crm_storage in Webform CiviCRM Integration 7.3
Webform submission hooks don't have access to $form_state So this extra submission handler stores it.
Parameters
$form: FAPI form array (to store) or form nid (to retrieve)
$form_state: FAPI form_state array
Return value
null
1 call to wf_crm_storage()
- wf_crm_process_submission in ./
webform_civicrm_forms.inc - Webform submission handler Create/update CiviCRM contacts and related data Called by presave, insert and update webform hooks
1 string reference to 'wf_crm_storage'
- _wf_crm_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.module, line 512 - Webform CiviCRM Integration Module: Links webform submissions to contacts in a CiviCRM database. @author Coleman Watts
Code
function wf_crm_storage($form, $form_state = NULL) {
static $storage = array();
// During form submission, store data for later
if (is_array($form) && !empty($form['#node']->nid) && !empty($form_state['civicrm'])) {
$storage[$form['#node']->nid] = $form_state['civicrm'];
}
elseif (is_numeric($form)) {
return wf_crm_aval($storage, $form, array());
}
}