function wf_crm_custom_types_map_array in Webform CiviCRM Integration 7.4
Same name and namespace in other branches
- 7.5 includes/utils.inc \wf_crm_custom_types_map_array()
Pull custom fields to match with Webform element types
Return value
array
2 calls to wf_crm_custom_types_map_array()
- 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_get_fields in includes/
utils.inc - Fetches CiviCRM field data.
File
- includes/
utils.inc, line 1773 - Webform CiviCRM module's common utility functions.
Code
function wf_crm_custom_types_map_array() {
$custom_types = array(
'Select' => array(
'type' => 'select',
),
'Multi-Select' => array(
'type' => 'select',
'extra' => array(
'multiple' => 1,
),
),
'AdvMulti-Select' => array(
'type' => 'select',
'extra' => array(
'multiple' => 1,
),
),
'Radio' => array(
'type' => 'select',
'extra' => array(
'aslist' => 0,
),
),
'CheckBox' => array(
'type' => 'select',
'extra' => array(
'multiple' => 1,
),
),
'Text' => array(
'type' => 'textfield',
),
'TextArea' => array(
'type' => 'textarea',
),
'RichTextEditor' => array(
'type' => module_exists('webform_html_textarea') ? 'html_textarea' : 'textarea',
),
'Select Date' => array(
'type' => 'date',
),
'Link' => array(
'type' => 'textfield',
),
'Select Country' => array(
'type' => 'select',
),
'Multi-Select Country' => array(
'type' => 'select',
'extra' => array(
'multiple' => 1,
),
),
'Select State/Province' => array(
'type' => 'select',
),
'Multi-Select State/Province' => array(
'type' => 'select',
'extra' => array(
'multiple' => 1,
),
),
'Autocomplete-Select' => array(
'type' => module_exists('webform_autocomplete') ? 'autocomplete' : 'select',
),
'File' => array(
'type' => 'file',
),
);
return $custom_types;
}