I have a problem with the prefix field.
I have set it to be optional and I added two values in "Prefix Dropdown Options": Mr;Mrs.
Everything it's correct except from the first option of the generated select, which is empty.
Here is the code:
<div class="select select__wrapper">
<select class="select" data-bind="
attr: {
name: inputName,
id: uid,
disabled: disabled,
'aria-describedby': getDescriptionId(),
'aria-required': required,
'aria-invalid': error() ? true : 'false',
placeholder: placeholder
},
hasFocus: focused,
optgroup: options,
value: value,
optionsCaption: caption,
optionsValue: 'value',
optionsText: 'label',
optionsAfterRender: function(option, item) {
if (item && item.disabled) {
ko.applyBindingsToNode(option, {attr: {disabled: true}}, item);
}
}" name="prefix" id="SO7RWP3" aria-invalid="false">
<option data-title="" value=" "></option>
<option data-title="Mr" value="Mr">Mr</option>
<option data-title="Mrs" value="Mrs">Mrs</option>
</select>
</div>
Any ideas on how to add a translation for the first option like "Select a prefix"? Thanks