You are here

function wf_crm_get_field in Webform CiviCRM Integration 7.5

Same name and namespace in other branches
  1. 7.4 includes/utils.inc \wf_crm_get_field()

Get a field based on its short or full name

Parameters

string $key:

Return value

array|null

5 calls to wf_crm_get_field()
webform_civicrm_update_7402 in ./webform_civicrm.install
Upgrade schema to handle multiple activities and cases
wf_crm_admin_form::getFieldsToDelete in includes/wf_crm_admin_form.inc
Search for fields that should be deleted
wf_crm_admin_form::handleDynamicCustomField in includes/wf_crm_admin_form.inc
When a custom field is saved/deleted in CiviCRM, sync webforms with dynamic fieldsets.
wf_crm_admin_form::postProcess in includes/wf_crm_admin_form.inc
Submission handler, saves CiviCRM options for a Webform node
wf_crm_webform_ajax::contactAjax in includes/wf_crm_webform_ajax.inc
Load one or more contacts via ajax

File

includes/utils.inc, line 1484
Webform CiviCRM module's common utility functions.

Code

function wf_crm_get_field($key) {
  $fields = wf_crm_get_fields();
  if (isset($fields[$key])) {
    return $fields[$key];
  }
  if ($pieces = wf_crm_explode_key($key)) {
    list(, , , , $table, $name) = $pieces;
    if (isset($fields[$table . '_' . $name])) {
      return $fields[$table . '_' . $name];
    }
  }
}