Loading


Advertisement:

Author Topic: Login/Register form with placeholders  (Read 1825 times)

Adyyda

  • Sr. Member
  • ****
  • Posts: 455
Login/Register form with placeholders
« on: July 07, 2015, 10:44:03 am »
Hello. I would like to change to login/register form so that it uses placeholders. Adding a placeholder is easy, we add it as placeholder="text for placeholder" but i am stuck because of this:

Code: [Select]
                                <label for="email"><?php _e('E-mail''modern') ; ?></label><br/>
                                <?php UserForm::email_login_text() ; ?><br/>

Right now, label gives the Title of the field and <?php UserForm::email_login_text() ; ?> gives the actual input area.

So how do we convert the initial code to one which uses placeholder, whithout any js as i have see on the forum?

victormendes

  • Newbie
  • *
  • Posts: 3
Re: Login/Register form with placeholders
« Reply #1 on: September 25, 2015, 11:10:12 pm »
Hello,

I am having the same problems, you managed to solve it?

Thx.

Adyyda

  • Sr. Member
  • ****
  • Posts: 455
Re: Login/Register form with placeholders
« Reply #2 on: September 25, 2015, 11:14:03 pm »
nope

cartagena68

  • Hero Member
  • *****
  • Posts: 1017
Re: Login/Register form with placeholders
« Reply #3 on: September 25, 2015, 11:54:57 pm »
you can use jquery to add placeholder

Code: [Select]
<script type="text/javascript">
$("#ID OF FIELD").attr('placeholder', '<?php _e('YOUR PLACEHOLDER''bender'); ?>');
</script>

Adyyda

  • Sr. Member
  • ****
  • Posts: 455
Re: Login/Register form with placeholders
« Reply #4 on: September 26, 2015, 12:06:15 am »
And that will work in all browsers, desktop and mobile?

cartagena68

  • Hero Member
  • *****
  • Posts: 1017
Re: Login/Register form with placeholders
« Reply #5 on: September 26, 2015, 12:12:24 am »
is working on chrome, firefox and edge, i don't knoe the others

Yarará Guazú

  • Newbie
  • *
  • Posts: 4
Re: Login/Register form with placeholders
« Reply #6 on: November 03, 2015, 01:12:01 am »
cartagena68 please.
Where Must I to past this code?
Thank you in advance.

cartagena68

  • Hero Member
  • *****
  • Posts: 1017
Re: Login/Register form with placeholders
« Reply #7 on: November 03, 2015, 03:21:59 am »
You can add it to the page where you need the placeholder or in footer.php

Yarará Guazú

  • Newbie
  • *
  • Posts: 4
Re: Login/Register form with placeholders
« Reply #8 on: November 03, 2015, 08:59:38 am »
Thank you cartagena68