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

Global automatic tab

Avatar

Level 5

Hello!

Is there a way of defining automatic tab for ALL fields in a form?

To define automatic tabs on the fields, individualy, I'm using this FormCalc field:

var fullCount = <field_length>
var currentString = xfa.event.newText
if(Len(currentString) >= fullCount) then
    xfa.host.setFocus("next_field_name")
endif

Now, is there a way of defining automatic tabs for all fields based on the order defined in the Tab Order panel?

Thank you for any ideas!

Marcos

3 Replies

Avatar

Level 10

Hi Marcos,

You could probably script a solution (see here: https://acrobat.com/#d=RZ1lzX23*u7L4N9rtWCYPQ).

While you can do it, it probably is not a good idea. The user expects to hit tab to go to the next field. If the focuses jumps automatically, while the user has their head down focussing on the keyboard, they may not realise that there are in a new field. This could lead to problems for the user and a poor user experience.

I think it would be better to deal with the tabbing order (either automatic which I prefer, or custom). See here for issues with setting tabbing order and object position: http://assure.ly/gBUUXB.

Hope that helps,

Niall

Avatar

Level 5

Hi Niall,

Thank you very much for the info. But actually I was looking for a script to place in one place and define all fields with automatic tab.

I agree 100% with you that it would be much better to use tab order, but the client does not accept this and wants a magic solution.

I suspected it was not possible, but... you know, I need to be sure before telling the client it cannot be done.

Thanks anyway.  

Marcos

Avatar

Level 10

Hi Marcos,

You could have a function in a script object.

There are two potential options.

The first is based on all fields being limited to the visible area (Object > Field palette). You could have a script in the Full event that calls the function and passes one parameter: the SOM expression for the next object.

The second is based on having script in the change event. This would pass three parameters, the actual length of the string, the max length of the string and the SOM expression for the next object.  If you do the if/else statement in the change event of each object then you would only need to pass one parameter, the SOM expression of the next object.

I think that you should also have some audio indication that the field focus has changed.

Here is an example: http://assure.ly/iso4b1. This still requires script in each object, in either the change event or the full event to call the function.

I hope that helps,

Niall