Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

setFocus

Avatar

Level 3

Dear

I want to set theFocus on textField when we open the pdf file.

The field link :

     "Formulaire.page1.myField"

Thanks for your help

1 Reply

Avatar

Level 7

Use this:

xfa.host.setFocus("Formulaire.page1.myField");

in the docReady event of the textfield. Be sure the scripting language is set to javascript.