Hi All,
I have the following script on exit event of a field on my form that I am designing, and basically if the format is wrong it should reset the cursor back to the field unless the correct format is entered. Here is the Code:
if
(this.formattedValue<>YYYYMMDD){
xfa.host.setFocus("Last_Name5");
}
For some reason it is not working, and I am just wondering if someone on this forum will know why.
Thanks
LP
Solved! Go to Solution.
Views
Replies
Total Likes
have you tried using a validation pattern on the field of num{99999999}?
Views
Replies
Total Likes
Could you upload your form? I'm mildly confused with what you are trying to accomplish by comparing a value from this, and then setting the focus to a field that I'm guessing deals with a last name
Thanks
Views
Replies
Total Likes
Thanks, but the field name is "Last-Name". The code I have is placed on the validate event, and is as follows:
if(Last_Name.FormattedValue != "99999999"){
xfa.host.setfocus("Last_Name");
}
Basically, what I am trying to do is prevent the cursor from moving out of the field until a true value that meets the formatted set up is met.
Thanks
LP
Views
Replies
Total Likes
Hi Ipianwi,
Did you try placing your code on the Enter event of the next field in the tabbing order? You might have better luck that way.
djaknow
Views
Replies
Total Likes
have you tried using a validation pattern on the field of num{99999999}?
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies