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.
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.
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.
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">
if (xfa.event.target.className=="field") xfa.host.setFocus(xfa.event.target.resolveNode("#traversal.#traverse").ref);