);
}
elseif ($add === 'addChainSelect') {
- $this->addChainSelect($setting, [
- 'label' => $props['title'],
- ]);
+ $this->addChainSelect($setting, ['label' => $props['title']] + $props['chain_select_settings']);
}
elseif ($add === 'addMonthDay') {
$this->add('date', $setting, $props['title'], CRM_Core_SelectValues::date(NULL, 'M d'));
'text' => 'Element',
'entity_reference' => 'EntityRef',
'advmultiselect' => 'Element',
+ 'chainselect' => 'ChainSelect',
];
$mapping += array_fill_keys(CRM_Core_Form::$html5Types, '');
return $mapping[$htmlType] ?? '';
'type' => 'Integer',
'quick_form_type' => 'ChainSelect',
'html_type' => 'ChainSelect',
+ 'chain_select_settings' => [
+ 'control_field' => 'defaultContactCountry',
+ ],
//'pseudoconstant' => array(
// 'callback' => 'CRM_Core_PseudoConstant::stateProvince',
//),