Copied to clipboard

Flag this post as spam?

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


  • Claushingebjerg 939 posts 2574 karma points
    Sep 10, 2014 @ 11:48
    Claushingebjerg
    0

    Using label as placeholder

    im interested in using the html attribute "placeholder" to house the label of the text input field.

    With v3 thanksfully its possible to schange the markup. But...

    <input type="text" name="@Model.Name" id="@Model.Id" class="text" placeholder="@Model.Label" value="@Model.Value"...

     Returns an error.

    What's the correct syntax for getting the field label inside the placeholder attribute?

     

  • Claushingebjerg 939 posts 2574 karma points
    Sep 10, 2014 @ 15:21
    Claushingebjerg
    100

    Got it. It's 

    <input type="text" name="@Model.Name" id="@Model.Id" class="text" placeholder="@Model.Caption" ...
Please Sign in or register to post replies

Write your reply to:

Draft