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

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

setFovus on Subform NOT! textfield

Avatar

Level 2

You can use xfa.host.setFocus("Subform1.childsubform.textfield1"); to place focus on a textfield/object element inside subform but does anyone know how to setFocus on a subform?

2 Replies

Avatar

Level 10

Hi,

the setFocus method only works with interactive objects like fields, buttons etc. not for containers like subforms or areas.

Avatar

Level 10

Hi,

There is a Doc.scroll method, which allows you to move to a particular x and y coordinate.  There is an example of using it at , Adobe LiveCycle Designer Cookbooks by BR001: Using the Doc.scroll method in a LiveCycle Designer For..., which might help.

I like using Doc.scroll because setFocus positions the field in the middle of the display area which I find can be confusing.  If the user has clicked on something to go to a particular part of the form I think they would expect it to be at the top of the page.

Regards

Bruce