Expand my Community achievements bar.

How To Set Up "Auto-Tabbing"

Avatar

Former Community Member
Does anyone out there have any idea how to enable automatic tabbing between single character fields. I have a big need for this and it seems like it should be a simple task to accomplish but I can't seem to figure it out. It would drastically increase the efficiency of my form for my end users to eliminate the need to hit the "Tab" button between these types of fields, when filling out my forms. Thanks -Craig
5 Replies

Avatar

Former Community Member
You could set up a change event on each field that fires a field focus to the next field in the set of fields.



Just add the following to the change event for each field:



xfa.host.setFocus("NEXT_FIELD");



Where NEXT_FIELD is the next field you want the user to tab to. The change event will fire off when the user enters a single character (thus changing what is in the field), and will set focus to the next field on the page automatically.

Avatar

Former Community Member
Thanks Kyle for making my life much easier. I gretaly appreciate it.

Avatar

Level 9
You may want to use the "Full" event, which will fire when the field is full - ie when the maximum number of characters has been reach. This allows you to use this technique with fields greater than 1 character.

It should also be possible to write some code that will automatically go to the next field in hierarchy sequence, rather than having to type in the name of the next field each time. If you'd like that code written, email info@avoka.com

Howard

Avatar

Former Community Member
Where is the "event field" for a text field? Where do I type in this information, and where do I locate "Full" event option?

Avatar

Level 9
Hi

Sorry about the delay - this turned out to be a bit more complex than I imagined. You can't actually use the "full" event, because this only fires when you enter "too much" information, not when you enter the last allowed value. The event should probably be called "limit-exceeded" instead of "full". So I did need to use "change" after all. There were also some interesting problems with getting the current value out of the event. But anyway, I have a sample for you...

If you'd like a copy of the sample, please email: info@avoka.com, and I'll send it to you.

Howard