I have created custom data type based on built-in dropdown list, but cannot figure out how to specify default value for the list. The default value is always blank:
I have created custom data type based on built-in dropdown list, but cannot figure out how to specify default value for the list. The default value is always blank:
Look at: FieldType.DropDownList in the fieldTypes folder.
Replace:<option value=""></option>
With:
var settings = Model.AdditionalSettings;
<option value="">@settings["DefaultValue"]</option>
Then ensure you set the default value property in your dropdown list in the Umbraco Forms backoffice for the given form