function Utils::wf_crm_custom_types_map_array in Webform CiviCRM Integration 8.5
Pull custom fields to match with Webform element types
Return value
array
Overrides UtilsInterface::wf_crm_custom_types_map_array
File
- src/
Utils.php, line 915 - Webform CiviCRM module's common utility functions.
Class
Namespace
Drupal\webform_civicrmCode
function wf_crm_custom_types_map_array() {
$custom_types = [
'Select' => [
'type' => 'select',
],
'Multi-Select' => [
'type' => 'select',
'extra' => [
'multiple' => 1,
],
],
'Radio' => [
'type' => 'select',
'extra' => [
'aslist' => 0,
],
],
'CheckBox' => [
'type' => 'select',
'extra' => [
'multiple' => 1,
],
],
'Text' => [
'type' => 'textfield',
],
'TextArea' => [
'type' => 'textarea',
],
'RichTextEditor' => [
'type' => 'text_format',
],
'Select Date' => [
'type' => 'date',
],
'Link' => [
'type' => 'textfield',
],
'Select Country' => [
'type' => 'select',
],
'Multi-Select Country' => [
'type' => 'select',
'extra' => [
'multiple' => 1,
],
],
'Select State/Province' => [
'type' => 'select',
],
'Multi-Select State/Province' => [
'type' => 'select',
'extra' => [
'multiple' => 1,
],
],
'Autocomplete-Select' => [
'type' => \Drupal::moduleHandler()
->moduleExists('webform_autocomplete') ? 'autocomplete' : 'select',
],
'File' => [
'type' => 'file',
],
];
return $custom_types;
}