Copied to clipboard

Flag this post as spam?

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


  • Steve 472 posts 1216 karma points
    Nov 13, 2012 @ 14:40
    Steve
    0

    Selects create an empty "option" tag

    I have alot of forms that will require select imputs, but none of the first options are ever populated. Looking at the code, Contour is creating an empty "option" tag in the "select" input so there is a blank field for the first item in the dropdown. Is there a way to prevent Contour from creating an empty option tag?

  • Matthias Bier 30 posts 90 karma points
    Nov 26, 2012 @ 16:16
    Matthias Bier
    0

    Hi Steve,

    I had the same problem - But if you update to Contour 3.0 you can modify the form markup easily.

    I decided to add the text "...please select..." to the empty option tag. But I guess you also can just remove this empty option tag in the razor file.

    You can find the razor file in the folder \umbraco\plugins\umbracoContour\Views. There you can edit the file "FieldType.DropDownList.cshtml" and modify the markup.

    The procedure is also explained in this video http://umbraco.com/follow-us/blog-archive/2012/11/8/contour-30-features-full-control-over-form-markup.aspx

     

      

Please Sign in or register to post replies

Write your reply to:

Draft