Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Martin Griffiths 826 posts 1269 karma points c-trib
    Mar 06, 2013 @ 12:09
    Martin Griffiths
    0

    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

    Mar 06, 2013 @ 13:03

    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

  • Martin Griffiths 826 posts 1269 karma points c-trib
    Mar 06, 2013 @ 13:04
    Martin Griffiths
    0

    Sorry I've only tried it in drop downs so far.

    Martin

  • Comment author was deleted

    Mar 06, 2013 @ 13:24

    Sure no prob will try now

  • Comment author was deleted

    Mar 06, 2013 @ 14:09

    Ok seems it only happens on the dropdown, it doesn't remember the state, looking into fix now

  • Comment author was deleted

    Mar 06, 2013 @ 14:17

    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

    Mar 06, 2013 @ 14:19

    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

  • Martin Griffiths 826 posts 1269 karma points c-trib
    Mar 06, 2013 @ 14:25
    Martin Griffiths
    0

    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

    Mar 06, 2013 @ 14:44

    Yeah value is always shown in entries viewer so you shouldn't notice a difference

Please Sign in or register to post replies

Write your reply to:

Draft