Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Show/hide subforms with Radio Buttons

Avatar

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

Avatar

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.

Avatar

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){