• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to change the text the user puts in, if the text is 'incorrect'?

Community Beginner ,
Nov 21, 2018 Nov 21, 2018

Copy link to clipboard

Copied

Good evening

I am wondering if there is a way to change text that the user puts in into "ERROR" if that said text is wrong.

For more clarification, I am trying to make a script where, if the user puts in the code "Z85" in a field where it shouldn't be there, it'll change the "Z85" into "ERROR."

TOPICS
Acrobat SDK and JavaScript , Windows

Views

260

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

correct answers 1 Correct answer

Community Expert , Nov 21, 2018 Nov 21, 2018

As the custom validation script of that field enter this code:

if (event.value=="Z85") event.value = "ERROR";

Votes

Translate

Translate
Community Expert ,
Nov 21, 2018 Nov 21, 2018

Copy link to clipboard

Copied

LATEST

As the custom validation script of that field enter this code:

if (event.value=="Z85") event.value = "ERROR";

Votes

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