Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Setting tab order to include fields in hidden subs

Avatar

Level 5

I have a form that has 2 subforms with 2 fields in each. The subforms are each hidden and become visible based on information entered in a defined field.  I have set the tab order to include the fields in each of these subforms but the tabbing does not work. I don't even know if this is something possible.  Subs are Sub22 and Sub 23.  If the FFY field is set at 23 then Sub 23 appears and the order should be FFY, Campaign, Enforcement, Date.  The same for Sub 22 if FFY is set at 22.  Only one sub can be showing at any one time.

 

https://drive.google.com/file/d/1iH0cUxE4MfEpmtEX0u2NOLi18Z8sGKbB/view?usp=sharing 

1 Accepted Solution

Avatar

Correct answer by
Level 10

Since you've used the Action Builder to set the presence of sub22 and aub23, it would be the easiest to use it also to set the focus. It come with such an action already, you just have to add it to the existing actions.

View solution in original post

9 Replies

Avatar

Level 10

There's a Tab order palette in Designer you can use to set up the tab order the way you want it. If it'S nit show, you can activate it from the View menu.

radzmar_0-1666473554677.png

 

Avatar

Level 5

That's what I have done.  However the tabbing only seems to works for the fields in the first subform.  However, when trying to set the order when the second subform is visible it really gets out of whack....

ReluctantProgrammer_0-1666612390416.png

I have never seen this happen before.  I tried to delete and rebuild the fields located in the second subform but that made no difference.

 

Avatar

Employee Advisor

@ReluctantProgrammer you can set up a custom tab order using the tab order tab. It should work for all the subform. send a test form here.

 

Have you tried making the subform visible and setting tabbing?

Avatar

Level 10

The tab order you set up with designer is hard coded into the form template. Each field can have a <traversal> element which points to the another field the focus has to be set next. This traversal element is not bound to anything so it can't be controlled by a input value or so. In your case it can only point to sumform sub22 or sub23 but not both. You'll have to use scriptings to tell the PDF viewer, where the focus has to go when selecting this ort that. 

Avatar

Level 5

I was afraid it might be something like this.  Thank you for the verification.

 

What/where is the scripting that will do this?

Avatar

Employee Advisor

@ReluctantProgrammer 

Here you go

 

JavaScript

xfa.host.setFocus(xfa.form.form1.TextField1);

FormCalc

xfa.host.setFocus("xfa.form.form1.TextField1")

Avatar

Correct answer by
Level 10

Since you've used the Action Builder to set the presence of sub22 and aub23, it would be the easiest to use it also to set the focus. It come with such an action already, you just have to add it to the existing actions.

Avatar

Level 5

Well the things you find when you open your eyes!   This is a great tool action to know.

 

Thank you so much!