Expand my Community achievements bar.

Repeatable subforms and tabbing.

Avatar

Former Community Member

 

Hello,

Does anyone have a sample code, in java script , that shows how to set focus on the first field of repeating subform. I have it calculation script and just cannot make it working in JavaScript.

Basically, if you are on the last field of the first subform and if repeatable subform exists, go the first field of that repeatable subform.

Thank you.

Calculation script that is woriking is:

mainForm.sub1.sub2.sub3.FF_3::exit

if ($.parent.instanceIndex < $.parent.instanceManager.count - 1) then

xfa.host.setFocus(concat("$.parent.parent.subform3[" , $.parent.instanceIndex + 1 , "].FF_1"))

endif

0 Replies