3

I've created a fillable PDF form using Acrobat 10. I see where you can set form fields to be required, but all that does is outline the fields in red.

How can I get a prompt asking users to enter data in the required fields when they hit save?

kmcamara
  • 187
  • 3
  • 5
  • 16

1 Answers1

3

You need to use Adobe-JavaScript if you want to achieve this.

Read this page in the Adobe documentation for more details:

Enforcing Required Fields

From that page, the code you have to include in your PDF file will look like this:

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.")
}

More details about the pop-up alert can be found here: https://acrobatusers.com/tutorials/popup_windows_part1

yms
  • 10,361
  • 3
  • 38
  • 68