Placeholder does not identify characters

Asked

Viewed 30 times

0

I’m having a problem with a placeholder and a login page,

<div class="group">
        @Html.TextBoxFor(t => t.Email, new { required = "required" } )  <span class="highlight"></span><span class="bar"></span>
        <label >E-mail</label>

    </div>

That placeholder and email <label>E-mail<label> .It stays in the Textarea where I should type the email, so I click and on and space to type the email, the problem and that if you reload the page or miss the password, it comes back and stands on top of the email I typed so unreadable.

I’ve been wanting to use the angular , ng-show or ng-Dirty to identify when there’s something in the input, but I have little web experience, so I wanted to ask for your help .

That page was not me who did so I just need to fix this problem, I need that when the page loads it identify that it has something written and tie the email textarea.

If anyone can help me or need any more information I would be grateful.

PS. I saw a solution similar to this one :

<div class="group">
        @Html.TextBoxFor(t => t.Email, new { required = "required", ng_model="email" } )  <span class="highlight"></span><span class="bar"></span>
        <label  ng-show="email == 0">E-mail</label>

    </div> 

But this isn’t working.

1 answer

1


The placeholder only to write the inside of the textbox, as you are using the textboxfor email property of your pojo object is not cleaning try to use so

@Html.TextBoxFor(x => x.Email, new { @placeholder = "E-mail" })
  • In a way this solves , the problem and that the way the placeholder is currently, in the case of the label, it makes an animation of going up when you click on the textarea. But since I don’t know that attribute I can’t change.

  • checks the css of your <span class="Highlight"></span><span class="bar"></span> object the classes that should be doing this effect

Browser other questions tagged

You are not signed in. Login or sign up in order to post.