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

Change fill color of radio buttons

New Here ,
Apr 12, 2018 Apr 12, 2018

Copy link to clipboard

Copied

I know this is very basic js but I am attempting to change the color of 3 groups of radio buttons based on the mouse up action on another specific radio button in a different group.  After the color change is set i am then resetting the group and setting it to read only but the trouble I am having is setting the fill color.  I am sure my syntax is incorrect but I have googled and can not find one that will work.  I am attempting to set the fill color to gray.  Any assistance would be appreciated. Thank you.

this.getField("Group2").event.target.fillColor = "150,150,150";

this.resetForm(["Group2"]);

this.resetForm(["Group3"]);

this.resetForm(["Group4"]);

this.getField("Group2").readonly = true;

this.getField("Group3").readonly = true;

this.getField("Group4").readonly = true;

TOPICS
Acrobat SDK and JavaScript , Windows

Views

430

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 , Apr 12, 2018 Apr 12, 2018

The first line is incorrect. Change it to:

this.getField("Group2").fillColor = ["RGB", 150/255,150/255,150/255];

Also, you can merge lines 2-4, like this:

this.resetForm(["Group2","Group3","Group4"]);

Votes

Translate

Translate
Community Expert ,
Apr 12, 2018 Apr 12, 2018

Copy link to clipboard

Copied

The first line is incorrect. Change it to:

this.getField("Group2").fillColor = ["RGB", 150/255,150/255,150/255];

Also, you can merge lines 2-4, like this:

this.resetForm(["Group2","Group3","Group4"]);

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 ,
Apr 12, 2018 Apr 12, 2018

Copy link to clipboard

Copied

LATEST

This worked perfectly.  Thanks for taking the time to help me out!

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