MyBB Community Forums

Full Version: Adding a modal login box to MyBB using jQuery
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
Adding the ID shouldn't break it as that should be the correct solution. In the short term, you can just delete the for attribute on the <label> tags.
That's what I thought euantor, but after I had it like that I figured that the registration page was not working for some weird reason.

Whenever I tried to insert a username / password, it showed a "passwords do not match" error or simple didn't validate the username in the registration.

Something is conflicting.


As you can see,

with the 'id' attribute:
[Image: uNAQH.png]

without the 'id' attribute:
[Image: KnVGV.png]

Also tested it with the default member_register templates. Same result.
Ah, I guess the JS validation use the ID password. You could replace the id with something like "login_pass" and change the for attribute to the same thing and see if it works.
You're right! Replacing the id-names works fine. I am using login_name and login_pass now.

However, everything also works fine when removing the 'for' attribute in the label tag so everyone can choose his own way of fixing it Smile

+rep given
I'll fix the OP too.
(2012-05-28, 08:14 PM)euantor Wrote: [ -> ]I'll fix the OP too.

Thanks for the fix, works great. Also, just to bring it to your attention, you forgot to put the underscore when you edited your post:

<label for="loginpassword">Password:</label>
<input type="password" value="" style="width: 200px;" size="25" name="password" class="textbox" id="login_password" />
You don't necessarily need the underscore. =)
(2012-05-30, 06:27 AM)king_og Wrote: [ -> ]You don't necessarily need the underscore. =)

Oh, I know. It just won't validate unless both of those are the same (one has an underscore, the other doesn't).
Ahh, I see.
Good catch. Fixed.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26