Hello

I am customizing web2py login form, but appear to stuck with this one.

In a normal HTML5 form, for password I can do following:
                   <input type="password" name="cpassword" id="cpassword" 
placeholder="Re-password" />

But how can i add a similar placeholder field to the web2py login form for 
the password field. I was able to do the same for the username field using 
the following function :

$('#auth_user_username').each(function() {

       var default_value = "Username";
       $(this).focus(function(){
               if(this.value == default_value) {
                       this.value = '';
               }
       });

       $(this).blur(function(){
               if(this.value == '') {
                       this.value = default_value;
               }
       });
});

Reply via email to