Expand my Community achievements bar.

Traversal (Tab) when Maximimum Number of Characters Supplied

Avatar

Level 7

The XFA 3.3 specification (pp. 503) states that it is possible to have a form that automatically tabs from field to field when the maximimum number of characters (maxChars) for the focused field is reached. However, I cannot seem to get this to work. Is this implemented in Adobe products?

1 Reply

Avatar

Level 7

I was able to come up with a workaround. Custom tab order must be set for this to work. Place this on the field you want to tab to the next field when the max chars is reached.

(change event)

try{

    if(event.name == "Keystroke")

    {

        var oTraverse = this.resolveNode("$..#traverse");

        var oText = this.resolveNode("value.text");

        if(oTraverse.ref != 'undefined')

        {

            if(oText.maxChars == xfa.event.newText.length)

            {   

                xfa.host.setFocus(this.resolveNode("$..#traverse").ref);

            }

        }else{

            xfa.host.messageBox("no traversal found. Are you using Custom tab ordering?");

        }

    }

}catch(e)

{

xfa.host.messageBox(e);

}