Hi support,
within my form I want to set a dropdownlist to be required.
To make this work I have to add an option with an empty value like
<option value="">--Please select--</option>
In my database the default value for this property is also set to an empty string.
But when I load the dropwdownlist like this
var listObj5 = new ej.dropdowns.DropDownList({
value: '<?=$model->inputenabled?>',
placeholder: '<?=Yii::t('challengeevent', 'Input Enabled')?>',
popupHeight: '200px',
floatLabelType: 'Auto'
});
listObj5.appendTo('#challengeevent-inputenabled');
the dropdownlist is empty (does not show --Please select--).
If I set the value in the database to a value which is listed in my option list (and is not empty) the value can be seen in the dropdownlist.
What can I do?
Is there another way to set required to the dropdownlist?
Regards,
Stephan