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

Form validation question

Avatar

Level 3

If I find a problem in the data entered in a form, can I cause a specific field to be highlighted after routing the user back to the field?  And can I cause a popup message warning the user of the specificly invalid field?

Newbie needs help,

Jerry

1 Accepted Solution

Avatar

Correct answer by
Level 10

The attached produces the following results to highlight various techniques for getting a user's attention. While the validations are relative to each field you can point the scripts at any field. Note, the 'Last Name' edit throws up the message box and sets focus back to the field if the field is null. Be VERY careful using 'xfa.host.setfocus()'. You can easily find yourself creating a form where user's get stuck...really stuck.

p1.png

Steve

View solution in original post

4 Replies

Avatar

Correct answer by
Level 10

The attached produces the following results to highlight various techniques for getting a user's attention. While the validations are relative to each field you can point the scripts at any field. Note, the 'Last Name' edit throws up the message box and sets focus back to the field if the field is null. Be VERY careful using 'xfa.host.setfocus()'. You can easily find yourself creating a form where user's get stuck...really stuck.

p1.png

Steve

Avatar

Level 3

Wonderful Example!

I've tried to implement the example unfortunatally I cannot make it work.

Under what event the code should placed? I've placed it in the Exit event is that right?

Deos the form need to be Dynamic?

I've included the form. The field that I want to check is called Requested By

Would you be kind to have a look?

Avatar

Level 3

Sorry for the late reply.  We just finished a four day weekend.

I made the form dynamic and I used the click event.  If this is still an open issue, I'll be happy to expand on that.