You are here

function wf_crm_component_token in Webform CiviCRM Integration 7.3

Look-up the webform token for a field

1 call to wf_crm_component_token()
_wf_crm_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.

File

./webform_civicrm_admin.inc, line 1421

Code

function wf_crm_component_token($node, $cid) {
  module_load_include('inc', 'webform', 'includes/webform.components');
  $component = $node->webform['components'][$cid];
  $parents = webform_component_parent_keys($node, $component);
  if (wf_crm_webform_version() == 3) {
    return '%value[' . implode('][', $parents) . ']';
  }
  return '[submission:values:' . implode(':', $parents) . ':nolabel]';
}