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

Trying to change color of text when a certain amount is entered in Adobe Acrobat DC

New Here ,
Jan 28, 2021 Jan 28, 2021

Copy link to clipboard

Copied

Hello, 

I am creating a form where I have text fields that I want the text color to change when the number entered is > 9, = 10 or more and <20. I have tried other scripts shown in the help forum but those didn't work see below

if(event.value <= 9){
event.target.textColor = color.black;}
else if (event.value == 10){
event.target.textColor = color.yellow;}
else if(event.value >= 11){
event.target.textColor = color.red;}

TOPICS
General troubleshooting , JavaScript , PDF forms

Views

366

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 , Jan 28, 2021 Jan 28, 2021

Use it as validation script.

Votes

Translate

Translate
Community Expert ,
Jan 28, 2021 Jan 28, 2021

Copy link to clipboard

Copied

Where does you use the script?

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
New Here ,
Jan 28, 2021 Jan 28, 2021

Copy link to clipboard

Copied

I tried it in the custom calculation script and in the document javascript neither worked. 

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
Community Expert ,
Jan 28, 2021 Jan 28, 2021

Copy link to clipboard

Copied

Use it as validation script.

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
New Here ,
Jan 28, 2021 Jan 28, 2021

Copy link to clipboard

Copied

That worked thank you so much for your help!!

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
Community Expert ,
Jan 28, 2021 Jan 28, 2021

Copy link to clipboard

Copied

LATEST

Your script doesn't cover all numbers between 9 and 10, and 10 and 11...

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