Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Auto tab using tab order

Avatar

Level 2

Hello ,

I have a PDF that has around 100+ pages that needs to have auto tabs from one textfield to the other. I have looked at other forums and came across this code: xfa.host.setFocus(this.resolveNode("#traversal.#traverse").ref); and placed it in the FULL event and haven't had any luck. I know you can do setFocus("NameofField)" but that would take forever placing the name of each textfield in the setFocus. Any help would be appreciated to make things easier for a 100+ page document.

Thanks again!

0 Replies

Avatar

Level 8

What exactly are you trying to accomplish?

If you want the tab order to automatically go from top left to bottom right, click Window on the menu bar and select Tab Order. Then select Automatic. Make sure all your fields in a row are aligned top.

Kyle

Avatar

Level 2

Once a textbox gets full (after typing in it) it will go to the next textbox based on the tab order

Avatar

Level 10

One problem doing it this way is that every text box will have to be filled to its max character limit for it to take effect (hence the Full event). So if fillers aren't completely filling the text box then it won't work.

Avatar

Level 8

Use your original code in the full event and make sure the tab order is set to custom. If it is set to automatic then the traversal node is removed from the template DOM.

Also, you can use event propogation so that all your fields inheret the code; you just have to type in once:

Select your top most subform and go View>XML Source. Right after the highlighted line paste in this:

<event activity="full" name="event__full" listen="refAndDescendents">
            <script contentType="application/x-javascript">

            if (xfa.event.target.className=="field") xfa.host.setFocus(xfa.event.target.resolveNode("#traversal.#traverse").ref);

</script>
</event>

Kyle