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

when a check box is checked it turns a field grey

New Here ,
May 18, 2022 May 18, 2022

Copy link to clipboard

Copied

Hi!

 

 

sorry im super super new to javascript btu trying to fumble my way through.

 

I managed to run a javascript with some overlays and managed to get them to change colour but i still need to be able to see the text underneath even when they are grey.

 

 

Check box is Check Box 1

and field is AOG

 

So what i want to be able to do is

When a check box is unticked the field is normal and text can be entered into it.

When the check box is checked, the field then becomes shaded grey but you can still see the text.

 

thankyou and i hope this is an easy fix as i have been searching on here for answers and havent quite managed how to get there yet

 

thankyou in advance!

 

 

 

TOPICS
General troubleshooting , JavaScript , PDF forms

Views

212

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 Employee ,
May 20, 2022 May 20, 2022

Copy link to clipboard

Copied

Hi @Rachel22145624p5f5 

 

Hope you are doing well.

As described, you want to customize the workflow of the check box fields, using the JavaScript.

 

Please checkout the help page https://acrobatusers.com/tutorials/javascript_console/ for information about using the JavaScript.

 

Hope it will help

 

Regards

Harsh

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 ,
May 20, 2022 May 20, 2022

Copy link to clipboard

Copied

LATEST

As Mouse UP event of checkbox add this script:

if(event.target.value != "Off"){
this.getField("AOG").readonly = true;
this.getField("AOG").fillColor = ["G",.8];}
else{
this.getField("AOG").readonly = false;
this.getField("AOG").fillColor = ["T"];}

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