JavaScript Show Text inside input both “Username” and “Password” until user starts to type show text inside input field,show text inside svg,show

I am working with PHP to display my log in form. Right now, the form shows "Username" but the text doesn't go away when the user starts to type. How can I have the text go away when the user starts to type so that the text "Username" doesn't overlap whatever they are typing?

Here is my "Username" code

<p class="infield grouptop">
        <input type="text" name="user" id="user" placeholder=""
               value="<?php p($_['username']); ?>"<?php p($_['user_autofocus'] ? ' autofocus' : ''); ?>
               autocomplete="on" required/>
        <label for="user" class="infield"><?php p($l->t('Username')); ?></label>
        <img class="svg" src="<?php print_unescaped(image_path('', 'actions/user.svg')); ?>" alt=""/>
</p>

Here is my "Password" code

<p class="infield groupbottom">
        <input type="password" name="password" id="password" value="" placeholder=""
               required<?php p($_['user_autofocus'] ? '' : ' autofocus'); ?> />
        <label for="password" class="infield"><?php p($l->t('Password')); ?></label>
        <img class="svg" id="password-icon" src="<?php print_unescaped(image_path('', 'actions/password.svg')); ?>" alt=""/>
</p>

I'd like to achieve the same thing for the password form.

Answer:1
<input type="password" placeholder="enter the password" onClick="this.value='';">

or

<input type="password" placeholder="enter the password" onClick="this.select();">

if it already have some value you can remove it onClick also or select it and automatically replaces when you start typing

Answer:2

You are looking for html placeholders.

http://www.w3schools.com/tags/att_input_placeholder.asp

<form action="demo_form.asp">
  <input type="text" name="fname" placeholder="First name"><br>
  <input type="text" name="lname" placeholder="Last name"><br>
  <input type="submit" value="Submit">
</form>
Answer:3

I'm trying to pass all the values from some selected divs, where the ids of the divs are the values I want to get and aggregate to a textbox, but I'm not getting any result. Basically I want the id ...

I'm trying to pass all the values from some selected divs, where the ids of the divs are the values I want to get and aggregate to a textbox, but I'm not getting any result. Basically I want the id ...

  1. aggregate values in sql
  2. aggregate values in r
  3. aggregate values in excel
  4. aggregate values in tableau
  5. aggregate values in pivot table
  6. aggregate values in power bi
  7. aggregate values in pandas
  8. aggregate values in python
  9. aggregate values in power query
  10. aggregate values in teradata
  11. aggregate values in alteryx
  12. aggregate values in sql server
  13. oracle aggregate values from one column
  14. aggregate of values

I'm trying to refactor a chunk of code that acts on each variable found in the variables array through by means of putting the variable name and its corresponding callback into an object that is ...

I'm trying to refactor a chunk of code that acts on each variable found in the variables array through by means of putting the variable name and its corresponding callback into an object that is ...

I am trying to json encode a variable to have the value of undefined, as in the javascript keyword undefined. I tried to google this, but the only results that show up are about people getting errors ...

I am trying to json encode a variable to have the value of undefined, as in the javascript keyword undefined. I tried to google this, but the only results that show up are about people getting errors ...

I am using the bootstrap popover for a drop down menu. Is there any way I could disable the popover function either with css media queries or by jquery on page resize and make the menu visible and ...

I am using the bootstrap popover for a drop down menu. Is there any way I could disable the popover function either with css media queries or by jquery on page resize and make the menu visible and ...

  1. disable bootstrap popover
  2. bootstrap disable popover on mobile
  3. ngx-bootstrap disable popover
  4. bootstrap popover disable click
  5. bootstrap popover disable arrow
  6. bootstrap popover disable title