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.
URL: http://forums.planetpdf.com/forum_posts.asp?TID=2064
Printed Date: 12 Nov 2018 at 10:24pm
Software Version: Web Wiz Forums 11.10 - http://www.webwizforums.com


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
Hello!

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?



Replies:
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 try6767@gmail.com
Check out my custom-made scripts website: http://try67.blogspot.com



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.10 - http://www.webwizforums.com
Copyright ©2001-2017 Web Wiz Ltd. - https://www.webwiz.net