Home > Acrobat, Adobe > Acrobat Pro: Form Validation

Acrobat Pro: Form Validation

validateI’m not an expert on form validations in Acrobat, but I CAN copy and paste from somewhere else.

When creating Acrobat Form Fields, you can insert validation scripts to make sure the values that are being returned are the ones you want. One popular option is to have the form field highlight a certain color based on that values are returned. I use this often in Excel, but never really in Acrobat. But it’s no surprise that validation scrpts in acrobat can be used to highlight fields as well. While I’m not an expert on validation scripts, I can copy-and-paste from a more knowledgeable source.

For a Form Field, Right Click and choose [Properties]. In the “Validate” tab, you can insert a custom validation script to change the appearance of the form field. Something like this:

// Set this field's background color based on the selected item
switch (event.value) {
case "High"   : event.target.fillColor = color.red;    break;
case "Medium" : event.target.fillColor = color.yellow; break;
case "Low"    : event.target.fillColor = color.green;  break;
default       : event.target.fillColor = color.white;  break;

And you can create form fields that change color. I did one as a test here.  Form Test.

If you are a glutton for punishment, Acrobat has pretty good support for Javascript, so you can read all about it here.  http://partners.adobe.com/public/developer/en/acrobat/sdk/AcroJSGuide.pdf

Original source of information is here in this Adobe Forums thread: http://forums.adobe.com/thread/892866

Categories: Acrobat, Adobe Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: