Copied to clipboard

Flag this post as spam?

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


  • Claushingebjerg 886 posts 2415 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 886 posts 2415 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" ...
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies