change the color of Field according to the value of another

Community Beginner ,
Jul 09, 2022 Jul 09, 2022

Copy link to clipboard

Copied

Hello everyone, I need to change the color of a box according to the value of another box, can someone help me please?

TOPICS
Create PDFs , PDF forms

Views

68

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 Beginner ,
Jul 09, 2022 Jul 09, 2022

Copy link to clipboard

Copied

or else, change the color according to the value of the box
if it is >= 1/1000 red
<= 1000 black

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
Adobe Community Professional ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

The description of your conditions is not clear. Do you want it to appear as red about 1000, and as black below it (inc.)?

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 Beginner ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

thank you 

if the value is > or =  1/1000 then the color is red 

if the value is < 1000 then the color is black

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
Adobe Community Professional ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

Those two conditions are overlapping. 20 is both bigger than (or equal to) 1/1000 and smaller than 1000, for example. Try explaining it in words, please, as I think you're confusing the mathematical operators.

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 Beginner ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

sorry 

if the risque is > or = 1/1000 then color of text is red 

if the risque is < 1/1000 then the color is black 

i forgot to put 1/

 

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 Beginner ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

Capture d’écran 2022-07-10 à 19.36.03.png

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 Beginner ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

risk > 1/1000 = risk greater than 1 in 1000

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 Beginner ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

1/1000 = 0,001

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
Adobe Community Professional ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

LATEST

OK, then you can use this code as the field's custom Validation script:

 

event.target.textColor = (event.value<0.001) ? color.black : color.red;

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