Copied to clipboard

Flag this post as spam?

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


  • Jeric 122 posts 192 karma points
    Mar 27, 2013 @ 21:17
    Jeric
    0

    Contour textfield and textarea not allowing any placeholder to be inserted

    Hi,

    Not really sure what's the issue with both textfield and textarea for contour as I'm not able to add in the placehilder part inside. It keeps removing the text written.


    Code as follow

    @model Umbraco.Forms.Mvc.Models.FieldViewModel

    <input type="email" placeholder="Enter your email address" name="@Model.Name" class="input-clear margin_b_10" 
    @{if(Model.Mandatory||Model.Validate){<text>data-val="true"</text>}}
    @{if (Model.Mandatory){<text> data-val-required="@Model.RequiredErrorMessage"</text>}}
    @{if (Model.Validate){<text> data-val-regex="@Model.InvalidErrorMessage" data-regex="@Model.Regex"</text>}}
    />


    Results shown

    <input type="email" placeholder="" name="d1300ea1-277d-40e0-bef4-2d44004c8f30" class="input-clear margin_b_10" data-val="true" data-val-regex="Your Email is not valid" data-regex="^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$">

     

    The placeholder part seems to emptied out. Appreciate any help

    thanks

     

  • Comment author was deleted

    Mar 29, 2013 @ 11:21

    Just tested and it works fine, are you sure you are updating the correct view?

  • Jeric 122 posts 192 karma points
    Apr 03, 2013 @ 19:45
    Jeric
    0

    Yup updating the correct view

     

  • Comment author was deleted

    Apr 04, 2013 @ 13:48

    That's strange, and nothing else in place that might be causing the behaviour

    Any chance I can take a look at the site, you can mail details to tg at umbraco dot com

    Thanks

  • Jeric 122 posts 192 karma points
    Apr 05, 2013 @ 13:19
    Jeric
    0

    Hey tim, seems to find out about the issue. It's caused by other API affecting contour.
    Thanks for all the help too 

  • Adam Maidment 54 posts 163 karma points
    Dec 05, 2013 @ 14:00
    Adam Maidment
    0

    Hi,

    I'd like to extend the initial query if possible and ask how you would insert the ToolTip text as the placeholder? I have tried the following but this doesn't work:

    <input type="text" name="@Model.Name" id="@Model.Id" class="text" value="@Model.Value" maxlength="200" placeholder="@Model.ToolTip"
    @{if(Model.Mandatory || Model.Validate){<text>data-val="true"</text>}}
    @{if (Model.Mandatory) {<text> data-val-required="@Model.RequiredErrorMessage"</text>}}
    @{if (Model.Validate) {<text> data-val-regex="@Model.InvalidErrorMessage" data-regex="@Html.Raw(Model.Regex)"</text>}}
    />
Please Sign in or register to post replies

Write your reply to:

Draft