Copy link to clipboard
Copied
I'm trying to conditionally fill in a date in a PDF form. I have located a script that automatically enters today's date in the form, but I want to make the automatic date populate the field ONLY if the field is blank.
In other words, if a date already exists in the field, I'd like Acrobat to not replace the date with today's date. This is the script I'm currently using:
event.value = util.printd("m/d/yyyy", new Date());
Can someone help me out here? Thank you.
Noob
Cleveland, Ohio
Thank you in advance.
Use this code:
if (event.target.valueAsString=="")
event.value = util.printd("m/d/yyyy", new Date());
Copy link to clipboard
Copied
Use this code:
if (event.target.valueAsString=="")
event.value = util.printd("m/d/yyyy", new Date());
Copy link to clipboard
Copied
You guys are rocks stars! Thanks. Works perfectly.