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.

setFovus on Subform NOT! textfield

Avatar

Former Community Member

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