+ Post New Thread
Results 1 to 5 of 5
EduGeek Joomla 1.5 Package Thread, How to edit text in login fields? in Projects:; Hello, I need to edit the text on the actual Login screen that a user sees in the Login fields ...
  1. #1

    Join Date
    Aug 2011
    Location
    Montreal
    Posts
    14
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    How to edit text in login fields?

    Hello,

    I need to edit the text on the actual Login screen that a user sees in the Login fields before logging in.
    There is a "username" in the first field and some "*****" in the second that prompt user what to type and where.
    But I find it very inconvenient that these hints do not disappear when I click in the field to type my login/password. This creates confusion and additional work for a user as he needs to delete these hints first and then type his details.

    Is there any way I can fix it?

    Thank you!
    The de Kuyper Education Centre

  2. #2

    Join Date
    Sep 2011
    Location
    London
    Posts
    8
    Thank Post
    5
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Looks like you have sorted this, as the hints disappear when users click in the fields. Are you using the default login module, because there are no hints shown on my version of the login module. If you are using another module, I dare say that there will be a setting to not show hints. If the hints aren't disappearing in your browser, then if you give me more details I'm sure we can find away to get rid of the hints. It's a bit of javascript that we need to track down and deactivate.
    Andy

  3. #3

    Join Date
    Aug 2011
    Location
    Montreal
    Posts
    14
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Hello Andy,

    sorry for a long delay in the reply!
    I kind of solved this problem, in this way:

    ************
    Edited the following 2 lines of code:

    (a) Edit the Username field:

    Before edit:
    Code:
    <input name="username" id="username" type="text" class="inputbox" alt="username" size="18" value="<?php echo JText::_('Username') ?>" />

    After the edit:
    Code:
    <input name="username" id="username" type="text" class="inputbox" alt="username" size="18" value="<?php echo JText::_('Username') ?>" onfocus="if (this.value=='Username') this.value='';" onblur="if (this.value=='') this.value='Username';" />


    (b) Edit the Password field:

    Before edit:
    Code:
    <input type="password" name="passwd" id="passwd" class="inputbox" size="18" alt="password" value="<?php echo JText::_('Password') ?>" />


    After edit:
    Code:
    <input type="password" name="passwd" id="passwd" class="inputbox" size="18" alt="password" value="<?php echo JText::_('Password') ?>" onfocus="if (this.value=='Password') this.value='';" onblur="if (this.value=='') this.value='Password';" />

    ***************************

    The user imanickam helped me with this code rewriting.

    I use the default login module for the moment.

    Maybe this may help you as well if you have a similar issue

    Thank you again for your attention!

  4. #4


    Join Date
    Feb 2007
    Location
    51.403651, -0.515458
    Posts
    9,808
    Thank Post
    262
    Thanked 2,969 Times in 2,183 Posts
    Rep Power
    847
    Probably not a lot of use, but here's an alternative approach of doing the same thing...

    robertnyman.com/2011/05/02/html5-placeholder-and-an-alternative-approach-introducing-roberts-playground/

    As you can see from the demo, the placeholder text remains visible until the user actually starts typing in the box. They don't need to delete the text before typing in the box either.
    Last edited by Arthur; 11th October 2011 at 06:30 PM.

  5. #5

    Join Date
    Aug 2011
    Location
    Montreal
    Posts
    14
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    thank you! it is an interesting way to edit login form. I will keep it in my bookmarks for sure.



SHARE:
+ Post New Thread

Similar Threads

  1. How to get started in thin client networking?
    By hunter_alexander in forum Thin Client and Virtual Machines
    Replies: 15
    Last Post: 5th August 2009, 07:56 AM
  2. How to prevent domain administrator login on workstations?
    By ronanian in forum Wireless Networks
    Replies: 8
    Last Post: 4th August 2009, 09:59 PM
  3. How to get involved in more projects!
    By big_nath in forum General Chat
    Replies: 5
    Last Post: 15th July 2009, 07:08 PM
  4. How to edit the header/title - Term Dates, Newsletter etc?
    By hlmyhlm in forum EduGeek Joomla 1.0 Package
    Replies: 1
    Last Post: 4th March 2008, 02:03 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •