Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8872257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:10:50+00:00 2026-06-14T18:10:50+00:00

For the login form I am trying to build it without any labels and

  • 0

For the login form I am trying to build it without any labels and use placeholder text so the user knows what to enter.

Q: How can I modify the below code so that the password is displayed a readable text for the placeholder only.

http://jsfiddle.net/DwAUY/

Note: I am also using the password mask plugin so this works like the iphone. Full example as jsfiddle.

/**
* @preserve jquery.outofplace.js
* HTML5 placeholders for all browsers
* Copyright (c) 2010 timmy willison
* Dual licensed under the MIT and GPL licenses.
* http://timmywillison.com/licence/
*/
$.fn.outOfPlace = function (opts) {

    opts = $.extend({

        // Gives you control over the submit function if needed
        // The default function removes the placeholder before
        // submitting the form in case the field is not required client-side
        submit: function () {
            $(this).find('input, textarea').each(function () {
                var $input = $(this);
                if( $input.val() === $input.data('placeholder') ) {
                    $input.val('');
                }
            });
            return true;
        },

        // The placeholder class for setting
        // placeholder styles in your own css
        // e.g. input.place { color: #666666; }
        // This creates a lot more flexibility for you and
        // keeps the js lightweight
        placeClass: 'place'
    }, opts);

    /** Checks for browser autofill */
    function check_autofill ( $input ) {
        setTimeout(function() {
            var v = $input.val();
            if ( v === $input.data('placeholder') ) {
                $input.addClass( opts.placeClass );
            } else {
                $input.removeClass( opts.placeClass );
            }
        }, 300);
    }

    return this.each(function () {
        var $input = $(this),
            defaultText = $input.attr('placeholder') || '';

        // Set the placeholder data for future reference
        $input.data('placeholder', defaultText);

        // Attribute no longer needed
        $input.removeAttr('placeholder');

        // Focus and blurs, notice the class added and removed
        $input.focus(function () {
            if ( $input.val() === defaultText ) {
                $input.val('').removeClass( opts.placeClass );
            }
        }).blur(function () {
            if ( $.trim($input.val()) === '' ) {
                $input.val( defaultText ).addClass( opts.placeClass );
            }
        }).blur()
        // Bind the submit function
        .closest('form').submit( opts.submit );

        check_autofill( $input );
    });
};  
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T18:10:51+00:00Added an answer on June 14, 2026 at 6:10 pm

    Replace this bit:

    $('input:password').password123({
        character: "●"
    });
    

    With this:

    $('input:password')[0].type="text";
    

    http://jsfiddle.net/DwAUY/2/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to build a login form but the textfields and the submit
I'm trying to build a login system with ajax and php. I use a
I am trying to build a simple login form in a chrome extension. In
I'm trying to add a login form onto my free mathhelp site, but whenever
I am trying to login to a site using a login form and submit
I'm trying to post to the login form of an application on another subdomain
I'm trying to send a getJson call from my app (login form) to get
I'm playing around with the physics login form from Doug Mccune's blog I'm trying
I am new to zend. I am trying to create login form using zend
How to build a login form on the startingpage within a little widget on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.