Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As Matt correctly suggest, you can use <strong>placeholder</strong> tag. </p> <p>But to get placeholder working, you cannot set "value". The solution is using conditional type, of course, or playing with jQuery framework. You can do something like this..</p> <pre><code>&lt;? $your_pass = 'bla-bla-bla'; ?&gt; &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Test page&lt;/title&gt; &lt;!-- Load jQuery library from Google repository --&gt; &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;form action="#"&gt; &lt;input type="password" name="log_password" id="log_password" /&gt; &lt;/form&gt; &lt;/body&gt; &lt;script&gt; $(document).ready(function() { /* execute this by jQuery when document is ready */ /* must use traditional javascript to change input's type attribute */ document.getElementById('log_password').setAttribute('type', 'text'); /* set empty value attribute of input with id "log_password" */ $('input#log_password').attr('val',''); /* set placeholder attribute */ $('input#log_password').attr('placeholder','Password'); $('input#log_password').focus(function(){ /* when input with id log_password is focus.. */ $(this).attr('placeholder',''); /* set the value as you prefer... */ $(this).val('&lt;?=$your_pass?&gt;'); /* reset type of input to password */ document.getElementById('log_password').setAttribute('type', 'password'); }); }); &lt;/script&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload