These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Move to top of Subform

carolbugarin
Registered: Sep 5 2007
Posts: 21
Answered

I have a repeating subform that is 2 pages long. The repeating part works perfectly. If I put the add subform button at the top of the form the user has to scroll up to the top of the last subform to select add subform button then scroll down to where the new subform starts. If I put the button at the bottom of the subform the user has to scroll up to the top of the new subform to start to enter the data. Either way is awkward.

I would like the user to press the add subform button at the bottom of the subform and have the curser move to the top of the new subform.

Not being very good at scripts I'm not sure how to program it to move to the top of the new subform when that form is added.

Any help would be appreciated
Thanks
Carol

twhayes
Registered: Sep 25 2007
Posts: 20
Take a look at the setFocus method in the help file. You might add this to the bottom of your add button script, to give focus to an object located at the top of your repeating subform. Then you can place the add button at the bottom of the subform.


Regards,
carolbugarin
Registered: Sep 5 2007
Posts: 21
I added this to my add subform button

xfa.host.setFocus("form1.RepSubform.(this.parent.parent.index)");

This works perfectly.

Thanks for your help

Carol