Compare field data in a fillable PDF with control data (for Employee Training)

Community Beginner ,
Aug 15, 2022 Aug 15, 2022

Copy link to clipboard

Copied

Hello! I am partnering with my org's training dept to see if there is a way have users fill out a PDF with specific control data, and then have Acrobat or some JS compare the user's data with the control data. If there are any text fields, date formatted fields, and/or radio buttons that the user fills out that doesn't match the control data (e.g. typos), then a message would appear to let them know. Currently I have JS that makes a window appear if they save the form and one or more required fields are empty. The window shows the tooltips for those fields. Can something similar be done to compare their data against the control data?

 

Thank you in advance!

TOPICS
How to , JavaScript , PDF forms

Views

27

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 23, 2022 Aug 23, 2022

Copy link to clipboard

Copied

LATEST

Hi,

 

It depends how fancy you want to be but you could just have a simple if statement for each field something like

if ( field1.value != "Control data"){
   // do whatever you want as it doesn't match.
}

 

It would not be very scalable is you control data changes often, but if it is fixed it would be a do once and you are good to go.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines