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

If Radio button checked then jump to text field - HELP

Avatar

Not applicable
I have two radio buttons - yes/no..when yes is selected i want it to automatic jump to the comment text field. Please help! with syntax.



I have search the forum high and low and can't find the answer.
3 Replies

Avatar

Not applicable
On the "yes" radio button insert the following script under the click or mouse-up event:



var comments = xfa.resolveNode("commentsField");

xfa.host.setFocus(comments)



Hope this helps,



Chris

Avatar

Not applicable
Chris, thanks but it didn't work. The radio buttons and text field are in subforms. I tried both click and mouse-up on the yes button (see below) but it didn't automatic jump to the text field....



var comments = xfa.resolveNode("form1.page1subformflow.middlesubform.otherexplan");

xfa.host.setFocus(comments);



please help!

Avatar

Not applicable
Chris, that's ok..I figured it out...thanks



don't setup as a var.