Auto Tab to next field
The Auto Tab issue: often when a comb field on a LiveCycle document is full one would like the cursor to move to the next field in the tab order automatically without the user needing to TAB. Many people have answered the 'auto tab' issue with solutions where the next field is an argument to some function (various references below), but I wanted a solution where the next field did not need to be named. After all, the document knows the next field in the tab order, so why do we need to name it?
In programming terms, the goal was to be able to add a statement Functions.autoTab(this); in a field's change event, where Functions is the name of a script object. Following is my JavaScript solution for comb fields where the tab order has been explicitely set through LiveCycle Designer menu item View/Tab Order. This results in the traverse element being defined for tabbed fields in the XML.
// AutoTab
function autoTab(oField){
if (xfa.event.newText.length ==
oField.ui.resolveNode("#" +
oField.ui.oneOfChild.className).comb.numberOfCells)
xfa.host.setFocus(oField.traversal.
resolveNode("#traverse").ref);
}
This has proved effective with many documents that have comb fields for:
- payments and tax grouped in millions, thousands and units
- dates and telephone numbers
- Australian tax file numbers
- ABNs (Australian Business Numbers)
and so on...
Various references that were found to this issue are:
http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=3191
http://groups.google.com/group/Acrobat-7-Form-Design/browse_thread/thread/ff299b42780f180a#
http://forum.planetpdf.com/wb/default.asp?action=9&read=47090&fid=5
http://www.adobeforums.com/webx/.3bc42894
Ideally, it would be better if autoTab were an available method for a field.
