Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Show/hide subforms with Radio Buttons

Goldie6175_
Level 2
Level 2

I am trying to show a subform when a radio button is clicked.  Here is the code I am using:

if (this.rawValue = 1){

DEXA.presence = "visible";

} else {

DEXA.presence = "hidden";

}

if (this.rawValue = 2){

Fluoroscopy.presence = "visible";

} else {

Fluoroscopy.presence = "hidden";

}

if (this.rawValue = 3){

Other.presence = "visible";

} else {

Other.presence = "hidden";

}

I am having a couple of issues.  One is that the radio button isn't showing it's active, and the second is that although the first subform (for DEXA) appears, the second subform (Fluoroscopy) doesn't show up when clicked.  I have been working on this for hours, so any help would be appreciated!

the document is here:  https://workspaces.acrobat.com/?d=QS6S9dZG2ha4TlXimR1n0w

Thanks, Anne

2 Replies
Bibhu_Bikash_Na
Level 9
Level 9

Hi Anne,

I guess your form is not published in Acrobat.com. Kindly Publish it by clicking : Share Document > Publish it> Copy the URL and paste it here.

Thanks,

Bibhu.

Jono_Moore
Level 10
Level 10

You need to use 2 equals signs to test a value. One equals sign assigns a value.

So all your if statements like this:

if (this.rawValue = 1){

Should look like this:

if (this.rawValue == 1){