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
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
Sure no prob will try now
Ok seems it only happens on the dropdown, it doesn't remember the state, looking into fix now
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"
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
Yeah value is always shown in entries viewer so you shouldn't notice a difference
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.