1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Placeholder Text inside loginBar .textCtrl

Discussion in 'Styling and Customization Questions' started by TsinJu, Nov 28, 2013.

  1. TsinJu

    TsinJu Well-Known Member

    Hello. I would like to change the Placeholder´s text position for "Your name or email address:" and "Do you already have an account?" from outside the Login Slider´s textCtrl Field to inside. On active field their should be no text anymore.
    Is it possible and can anyone help me with that?

    text_inside.jpg
     
  2. Adam Howard

    Adam Howard Well-Known Member

    This can easily be changed by looking for these phrases templates

    AdminCP > Appearance > Phrases
    • do_you_already_have_account
    • your_name_or_email_addres
     
    Amaury likes this.
  3. TsinJu

    TsinJu Well-Known Member

    Doesn´t this just change the names?
     
  4. Adam Howard

    Adam Howard Well-Known Member

    Nope, this will change the desired text you have inquired about.

    www.sociallyuncensored.eu 2013-11-28 14 48 56.png

    Replace it with whatever you wish to have in it's place (inside the phrase text box)
     
  5. TsinJu

    TsinJu Well-Known Member

    But i dont want to replace the text, i want to move the Text (e.g. Your name or email address), as shown in the picture, from left to inside the name´s form field.

    Sorry for any Misunderstanding, but i thought the picture helps clarifying my wish?!
     
  6. Adam Howard

    Adam Howard Well-Known Member

    I'm sorry, I gathered you wanted to change it. I was not clear that you wanted to move it inside the box. I just assumed you meant you wanted to change the text.

    I'm sure the photo made it clear for most people who use it, but I normally do not use the drop down menu often. And when I do, my password manager usually fills in everything already so I never get to see what it looks like empty.

    Will get back to you on this...
     
    TsinJu likes this.
  7. TsinJu

    TsinJu Well-Known Member

    Thank you very much...
     
  8. Adam Howard

    Adam Howard Well-Known Member

    OK

    part 1 -- Add the text inside the box

    login_bar_forum

    look for
    PHP:
          <dd><input type="text" name="login" id="LoginControl" class="textCtrl" tabindex="101" /></dd>
    change too
    PHP:
          <dd><input type="text" name="login" id="LoginControl" class="textCtrl" placeholder="{xen:phrase your_name_or_email_address}" tabindex="101" /></dd>
    look for
    PHP:
                <input type="password" name="password" class="textCtrl" id="ctrl_password" tabindex="102" />
    change too
    PHP:
                <input type="password" name="password" class="textCtrl" placeholder="{xen:phrase do_you_already_have_account}" id="ctrl_password" tabindex="102" />
    I'm trying to figure out now how to remove the text on the side (as I believe you wanted), but you have one hell of an alignment issue when you remove it.

    Working on it....
     
  9. Adam Howard

    Adam Howard Well-Known Member

    OK

    part 2 - remove the side text

    Same template...


    Look for
    PHP:
          <dt><label for="LoginControl">{xen:phrase your_name_or_email_address}:</label></dt>
    replace with
    PHP:
          <dt><label for="LoginControl"></label></dt>
    Look for
    PHP:
                    <label for="ctrl_password">{xen:phrase do_you_already_have_account}</label>
    replace with
    PHP:
                    <label for="ctrl_password"></label>
    DONE :)

    Screenshot from 2013-11-28 17:10:48.png
     
  10. TsinJu

    TsinJu Well-Known Member

    Works perfect!!!
    Thank you so much for your help (y);)

    Edit: For "no Text" on focused Input, i will use some js maybe
    http://jsfiddle.net/mPLFf/4/

    or if possible with CSS, but not sure if google will like hiding text?!
     
  11. Adam Howard

    Adam Howard Well-Known Member

    login_bar.css

    Would allow you to further customize the log-in bar to your liking. ;)
     
    TsinJu likes this.
  12. TsinJu

    TsinJu Well-Known Member

    Thought so. Thanks for the tip ;)

    Allow me a last Question?!
    The Idea is just to have the "No, create an account now." Radio Button as a Checkbox.

    I edited this Code
    Code:
     <li><label for="ctrl_not_registered"><input type="radio" name="register" value="1" id="ctrl_not_registered" tabindex="105" checked="checked" class="Disabler" />{xen:phrase no_create_account_now}</label></li>
    into this (just changed "radio" into "checkbox")
    Code:
     <li><label for="ctrl_not_registered"><input type="checkbox" name="register" value="1" id="ctrl_not_registered" tabindex="105" checked="checked" class="Disabler" />{xen:phrase no_create_account_now}</label></li>
    and deleted
    Code:
    li><label for="ctrl_registered"><input type="radio" name="register" value="0" id="ctrl_registered" tabindex="105" checked="checked" class="Disabler" />{xen:phrase yes_my_password_is}:</label></li>
    i have a checkbox now (wohoo ;) ), but it works the other way round. When "uncheck´ing" the checkbox, the field where to enter the Password is inactive, when checking its active.
    Guess it´s because the Code at all is wrong, but, hell, i have no idea what to do.
    Tried Google but can´t find any way that helps me getting this done.

    At the End both Radio Button "No, create an account now." and "Yes, my password is:"
    shall become one as checkbox...
     
  13. Adam Howard

    Adam Howard Well-Known Member

    I forget where it is, but there is an "and / or" statement somewhere. So you need both boxes for it to work. You can't just remove one. I don't recall how to change that (sorry).
     

Share This Page