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

SOLVED

Cannot set focus when reset data using datasets

WhatCindy
Level 2
Level 2

Hi All,

When I click reset form button. I would like to reset data then focus to the first field. I can clear information I provided but setFocus to the first name field is not working. Please help.

I use datasets to reset data. 

Here is my coding:
event: click

xfa.datasets.data.loadXML("<form1/>", true, true);

 

xfa.host.setFocus("xfa.form1.contactInformation.firstname")

Thanks,

Cindy

1 Accepted Solution
TundraSteve
Correct answer by
Level 8
Level 8

Put the setfocus on the form:ready event of form1

View solution in original post

4 Replies
TundraSteve
Level 8
Level 8

xfa.host.setFocus("form1.contactInformation.firstname")

WhatCindy
Level 2
Level 2

I tested the clear button. But it is not set Focus to the first field. It is not successful.

TundraSteve
Correct answer by
Level 8
Level 8

Put the setfocus on the form:ready event of form1

View solution in original post