Dropdown list and check box Field Type settings not working
I have created a new custom field type with a field setting that uses the drop down list control as follows:
[Setting("Data Format",
description = "Data Format",
control = "Umbraco.Forms.Core.FieldSetting.Dropdownlist",
prevalues = "None,Email")]
public string DataFormat
{
get;
set;
}
This works fine when I first create a new field - I can pick an option from the drop down list and save the value. However, when I reload an existing form and change the field setting, the new value is not saved. I have also found the same problem when using a Check box field type.
I've just done a bit more investigation with a field setting that has 3 prevalue options:
[Setting("Add Blank Option",
description = "Add a blank option as the first of the selected items",
control = "Umbraco.Forms.Core.FieldSetting.Dropdownlist",
prevalues = "None,Blank,Please select...")]
public string AddBlankOption
{
get;
set;
}
Weirdly, I can switch between "Blank" and "Please select..." (2nd and 3rd options) and it works fine. But when I try and select the first option, it reverts back to whatever was previously selected.
Steps to reproduce:
Create a form with the field with either the second or third options selected for the field setting.
Open the form again for editing, edit the field
Set the field setting to the first option
Click "Update Field"
Edit the field again, expand the Advanced Settings
The field setting has reverted back to the previous value
So it seems that the problem is just with selecting the first option in the drop down - I suppose the code may interpret this as the field setting having no value, and therefore does nothing with it? (just a wild stab in the dark...)
I am using Umbraco 4.7 with Contour version 1.1.11, Full version (with paid for licence)
Dropdown list and check box Field Type settings not working
I have created a new custom field type with a field setting that uses the drop down list control as follows:
This works fine when I first create a new field - I can pick an option from the drop down list and save the value. However, when I reload an existing form and change the field setting, the new value is not saved. I have also found the same problem when using a Check box field type.
Any ideas how to get this working?
Comment author was deleted
That's strange I'll check the issue tomorrow and let you know what I find
I've just done a bit more investigation with a field setting that has 3 prevalue options:
Weirdly, I can switch between "Blank" and "Please select..." (2nd and 3rd options) and it works fine. But when I try and select the first option, it reverts back to whatever was previously selected.
Steps to reproduce:
So it seems that the problem is just with selecting the first option in the drop down - I suppose the code may interpret this as the field setting having no value, and therefore does nothing with it? (just a wild stab in the dark...)
I am using Umbraco 4.7 with Contour version 1.1.11, Full version (with paid for licence)
is working on a reply...