wrapper($input);
}
private static function field($field, $rowID, $field_name, $form_atomic_Cls_map, $formID, $error = null, $value = null)
{
$fh = new ConversationalFieldHelpers($formID, $field, $rowID, $form_atomic_Cls_map);
$img_url = BITFORMS_ROOT_URI . '/static/countries/';
$req = $fh->required();
$disabled = $fh->disabled();
$readonly = $fh->readonly();
$name = $fh->name();
$ph = $fh->placeholder();
$ariaDescribedBy = $fh->ariaDescribedBy();
$ariaRequired = $fh->ariaRequired();
// Get dynamic label ID to properly link the combobox to its label for screen readers
$labelId = $fh->getLabelId();
$selectedFlagImage = '';
$tabIndx = isset($field->disabled) ? -1 : 0;
$selectedCountryClearable = '';
$searchPlaceholder = '';
$searchClearable = '';
$options = '';
$readonlyCls = isset($field->readonly) ? 'readonly' : '';
$disabledCls = isset($field->disabled) ? 'disabled' : '';
$img = esc_url(includes_url('images/blank.gif'));
$val = $fh->value();
if ($fh->property_exists_nested($field, 'config->selectedFlagImage', true)) {
$selectedFlagImage = sprintf(
'
',
$fh->getConversationalMultiCls('selected-country-wrp'),
$fh->getCustomAttributes('selected-phone-img'),
$fh->getConversationalMultiCls('selected-country-img') . ' ' . $fh->getCustomClasses('selected-country-img'),
$img
);
}
if ($fh->property_exists_nested($field, 'config->selectedCountryClearable', true)) {
$selectedCountryClearable = sprintf(
'
',
$fh->getCustomAttributes('input-clear-btn'),
$fh->getConversationalMultiCls('input-clear-btn') . ' ' . $fh->getCustomClasses('input-clear-btn')
);
}
if ($fh->property_exists_nested($field, 'config->searchPlaceholder', '', 1)) {
$searchPlaceholder = "{$field->config->searchPlaceholder}";
}
if ($fh->property_exists_nested($field, 'config->searchClearable', true)) {
$searchClearable = sprintf(
'
',
$fh->getCustomAttributes('search-clear-btn'),
$fh->getConversationalMultiCls('icn') . ' ' . $fh->getConversationalMultiCls('search-clear-btn') . ' ' . $fh->getCustomClasses('search-clear-btn')
);
}
return '
getCustomAttributes('phone-fld-wrp') . '
class="' . $fh->getConversationalMultiCls('phone-fld-wrp') . ' ' . $fh->getCustomClasses('phone-fld-wrp') . ' ' . $readonly . ' ' . $disabled . '"
>
disabled() . '
' . $fh->readonly() . '
' . $val . '
/>
getCustomAttributes('option-wrp') . '
class="' . $fh->getConversationalMultiCls('option-wrp') . ' ' . $fh->getCustomClasses('option-wrp') . '"
>
';
}
}