Print Page | Close Window

Alert user if two text fields don't match

Printed From: Foxit's Planet PDF Forum
Category: Lets Talk PDF
Forum Name: PDF Developers
Forum Description: This conference is for PDF developers.
Printed Date: 24 Apr 2019 at 1:07am
Software Version: Web Wiz Forums 11.10 -

Topic: Alert user if two text fields don't match
Posted By: smashek
Subject: Alert user if two text fields don't match
Date Posted: 20 Oct 2016 at 5:24pm

I need a script that compares the text entered in fieldB to that in fieldA. If the text in fieldB doesn't exactly match that of fieldA, an alert should pop up notifying the user of the discrepancy. Does anyone know of a script that accomplishes that?

Posted By: try67
Date Posted: 28 Oct 2016 at 7:56am
Use this code as the custom validation script of fieldB:

if (event.value!=this.getField("fieldA").valueAsString) app.alert("The values don't match!");

- Acrobat Expert - Contact me personally at
Check out my custom-made scripts website:

Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.10 -
Copyright ©2001-2017 Web Wiz Ltd. -