Page 1 of 1

Registration form TAB order

PostPosted: March 24th, 2011, 9:01 am
by man-O-media
Hi all...

This problem seemed to go away when I updated to 3.55 but I changed my custom registration fields yesterday and now I am again having a form 'TAB Order' issue.

Including the default wp fields, my registration form has about 11 required fields followed by some optional fields.
If a new registrant uses tab to move through the form it all behaves nicely until the second to last required field. From there, TAB moves to the 'Register' button.
Another TAB takes you back up to the next field in the form where you should have been.

Anyone seen this before?

Thanks, Daine

Re: Registration form TAB order

PostPosted: March 25th, 2011, 1:20 am
by Cristián Lávaque
I had never noticed this. Thanks for reporting it! I'll let Jason know. :)

Re: Registration form TAB order

PostPosted: March 26th, 2011, 2:16 am
by Jason Caldwell
Hi Daine. Thanks for your assistance in the forum.
I've updated your Rank to "Experienced User". It's really great to have your assistance.

Can you please attach a screen shot for me?
I'll investigate this for you, but just to make sure I'm looking in the right place, a screen shot will help. Better yet, please email me a link to the form you're having trouble with ( if that's possible ). Thanks!

Re: Registration form TAB order

PostPosted: March 26th, 2011, 3:46 am
by Jason Caldwell
Thanks for reporting this important issue.

OK. This is a compatibility issue.
WordPress applies a default tabindex of 100 to the submission button on the default Registration Form; and starts with a tabindex of 10/20 for the Username/Password that it builds in by default.

So in cases like yours, where there are MANY Custom Registration Fields, s2Member can potentially go beyond the bottom-most tabindex of 100. This happens because s2Member increments its Custom Registration tab indexes by 10; leaving room between each Field for custom Hooks/Filters.

So the solution we're going to implement in the next release of s2Member, is to modify the form submission button to a tabindex of 1000, making additional room for site owners with many Custom Registration Fields. This can be handled dynamically via jQuery.

I'm attaching a JavaScript file for you with these changes, so you can go ahead and correct this issue on your installation while you're waiting for the next release of s2Member ( v3.5.8+ ). Incidentally, I'm also including a bug fix in this JavaScript file that corrects the bug you reported here.

Please upload this file and allow it to override your existing copy.
/wp-content/plugins/s2member/includes/s2member-min.js
( then, clear your browser cache; and/or refresh the page )
s2member-min.js
(8.61 KiB) Downloaded 18 times

Re: Registration form TAB order

PostPosted: March 26th, 2011, 3:50 pm
by man-O-media
As I said in the password post... You be da man !!!

Seems kind of funny to me though.
I kind of understand leaving holes in the tab order for other underlying code but why not just calculate the tab order at run time?
I would think that it would be pretty easy to traverse the form, count the required TAB stops, add what ever you need in the middle and put the button at the end.
Then again, I guess it is pretty unlikely someone will build a form with hundreds of data fields :shock:

Daine

Re: Registration form TAB order

PostPosted: March 26th, 2011, 4:10 pm
by Cristián Lávaque
man-O-media wrote:Then again, I guess it is pretty unlikely someone will build a form with hundreds of data fields :shock:


I guess you would need a pretty hard-core user to convert with one of those. :lol:

Re: Registration form TAB order

PostPosted: March 26th, 2011, 9:17 pm
by Jason Caldwell
man-O-media wrote:As I said in the password post... You be da man !!!

Seems kind of funny to me though.
I kind of understand leaving holes in the tab order for other underlying code but why not just calculate the tab order at run time?
I would think that it would be pretty easy to traverse the form, count the required TAB stops, add what ever you need in the middle and put the button at the end.
Then again, I guess it is pretty unlikely someone will build a form with hundreds of data fields :shock:

Daine

Thanks for the great suggestion. I'll take a look at that possibility.
~ and thanks for the KUDOS! You too :-)