How to enforce Required Fields in a PDF form
Article # 3015334 - Page views: 1824
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:
- Open the PDF form
- Right-click on the form field > click on Properties > click General
- Select Required
- Click on Actions
- Under Select Trigger, select On Blur
- Select Run a JavaScript under Select Action
- 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."