Copy link to clipboard
Copied
Hi all! I know this question has been asked to death by now but I was unable to find the answer. Any who, I'm trying to add a bloody script for a pre made form to make all Field mandatory and give it a pop up as well! Also how do I apply this to the form itself? I have Java enabled on Adobe DC pro.
I'm not sure if this right code
f = getField(event.target.name)
if (f.value.length == 0)
{
f.setFocus()
//Optional Message - Comment out the next line to remove
app.alert("This field is required. Please enter a value.")
}
I got this from Adobe's Acrobat 8 developers tips, wondering if this also works in DC pro as well. if this code is no good can someone post be the right code please and thank you.
Message was edited by: Steven Robertson
Should work just fine in Acrobat DC.
Copy link to clipboard
Copied
Should work just fine in Acrobat DC.
Copy link to clipboard
Copied
Okay, however how do I apply to said form? I'm in Java right now but have no clue how to apply it. I go into the PDF that on adobe 8 developer tips for this I can edit the form and I can see text field properties and there bar called Actions where you can add the script to. However when I go back to my form I don't see the action bar in text field properties, perhaps I don't have something enabled correctly on my form?
Copy link to clipboard
Copied
What kind of script did the tutorial you found say it was?
Copy link to clipboard
Copied
I figured it out yay! I got it working.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now