Skip to main content
Kofax

How to enforce Required Fields in a PDF form

How to enforce Required Fields in a PDF form

Summary:

Required fields can be defined in the Field Properties > General menu. It is possible to further enforce these fields to prevent users from leaving fields blank with the implementation of JavaScript.

Information:

  1. Open the PDF form
  2. Right-click on the form field > click on Properties > click General
  3. Select Required
  4. Click on Actions
  5. Under Select Trigger, select On Blur
  6. Select Run a JavaScript under Select Action
  7. Insert the following text:

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

    }

    8.  Click OK > Close

Note: Nuance Communications, Inc. provides above information "as is."