Copied to clipboard

Flag this post as spam?

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


  • Ivan 165 posts 543 karma points
    Aug 02, 2017 @ 10:53
    Ivan
    0

    Default value for dropdown list.

    Is it possible to have a default value any different from the blank one?

    enter image description here

  • Manish 373 posts 932 karma points
    Aug 02, 2017 @ 12:34
  • Manish 373 posts 932 karma points
    Aug 02, 2017 @ 13:20
    Manish
    1

    I think you can use nupicker drop down.

  • Damien 36 posts 162 karma points
    Mar 14, 2019 @ 11:17
    Damien
    2

    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

    enter image description here

    enter image description here

  • Mohammad Javed 14 posts 95 karma points
    Aug 16, 2023 @ 08:29
    Mohammad Javed
    0

    This worked a treat! Thank you.

Please Sign in or register to post replies

Write your reply to:

Draft