If I postback a form (with errors) I get the expected validations and data entered is retained, but default values in lists are not restored (resets to blank, first item).
Do we need to provide the ID? I've looked back through my test entries and it returns the full country name that appeared in the list (ID contains the ISO codes).
Default values not restored on form validation
Hi Tim
If I postback a form (with errors) I get the expected validations and data entered is retained, but default values in lists are not restored (resets to blank, first item).
Can you look into this for me?
Many thanks
Martin
Comment author was deleted
Sure will take a look, does this happen on all fieldtypes or just the dropdowns?
Added to the issue tracker: http://issues.umbraco.org/issue/CON-298
Sorry I've only tried it in drop downs so far.
Martin
Comment author was deleted
Sure no prob will try now
Comment author was deleted
Ok seems it only happens on the dropdown, it doesn't remember the state, looking into fix now
Comment author was deleted
Ok found a fix simply update
\Umbraco\Plugins\umbracoContour\Views\FieldType.DropDownList.cshtml
And change
<option value="@pv.Id.ToString()"
to
<option value="@pv.Value"
Comment author was deleted
Let me know if that fixes it for you, should also fix the fact that the dropdown passed the prevalue id as a value in codefirst
Hi Tim
Do we need to provide the ID? I've looked back through my test entries and it returns the full country name that appeared in the list (ID contains the ISO codes).
Anyway that works for me :-)
Thanks Tim
Regards
Martin
Comment author was deleted
Yeah value is always shown in entries viewer so you shouldn't notice a difference
is working on a reply...