These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

validate Event

Boon
Registered: May 5 2010
Posts: 66

Hello,

I have some code in the validate event in one of my fields. I notice that this code run every time I enter value into the form, not just the field that has a code in.

How can I set it up so that the code will run only when the value of that field is changing.

I don't want this code to run every time I work on other fields which are not related to that field at all.

Thank you for your help,
Boon

pdf_fanatic
Registered: Jun 4 2010
Posts: 22
Hello Boon,

It will be be more helpful if you can paste your code snippets.
At this point i can only guess that you might have fields with the same name

Regards
http://randomschool.com/freelancework

Gurmeet

Boon
Registered: May 5 2010
Posts: 66
Hi,

says in TextField1, I put TextField2.rawValue="Done" in the Validate event.

I want this code to be run only when a focus is in TextField1, and the value in TextField1 satisfies with the condition I set in the Validate Event.

I have put this code in validate event of textField1. The problem I have is that when I put the valid value in textField1, the value in TextField2 will be changed to "Done". Now, when I manually change the value in TextField2 to other things and exit the field,the value in Textfield2 change back to "Done"

I guess what happened was that my code in the validate event executed everytime something is changed in the form. I might put the code in wrong event?

All I want to do is that to have this code executed every time the value in TextField1 change. If the value in TextField1 doesn't change, don't run the code.

thanks,
Boon
pdf_fanatic
Registered: Jun 4 2010
Posts: 22
yes i think that you are right in saying that you are placing the code in the wrong event.

If closely go through the definition of the validate event you can get more insight.
"Initiates when the form design and data merge to create your form and when a field loses focus; for example, when a form filler clicks or uses the Tab key to exit a field. This event initiates again each time the value of a field changes."

so you can place your code on other "process events" and then try.

Regards
http://randomschool.com/freelancework

Gurmeet

pdf_fanatic
Registered: Jun 4 2010
Posts: 22
I am not near my laptop. i will try this at my end also...hopefully will be resolved.

Regards
http://randomschool.com/freelancework

Gurmeet