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.
SOLVED

radio to show hidden subform

Avatar

Level 1

I have spent hours try to figure out how to show "Hidden" subforms to appear with radio buttons. I read everything on the first two pages of google all say the same thing to use:

if (this.rawValue == "1")

{

    form1.main.Page1.hide.presence = "visible";

}

else

{

    form1.main.Page1.hide.presence = "hidden";

}

I have item values assigned under the radio buttons binding (1 and 2). The hid subform is set to Flowed

Capture.JPG

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

The code in your original question looks ok to me.  The code in the image doesn't as there's no Text object under the hide subform.

Are you getting any errors/exceptions when you preview?

Here's a sample that I think does what you are trying to do.

https://sites.google.com/site/livecycledesignercookbooks/home/WCtech.pdf?attredirects=0&d=1

You do need this on the master page?

Bruce

View solution in original post

5 Replies

Avatar

Former Community Member

I don't know why, but when I renamed a standard name of the object to other (by example from Circle1 to Cir), then the code works.

May be it help you?

CIR_hidden.png

Avatar

Level 1

Thanks for the idea.

I need it to affect a subform with content not just the circle. I did try taking it out of the subform and updating the code with the new location. Still no go. I have been playing around with this for a week now and read everything I can find......

Avatar

Correct answer by
Level 10

Hi,

The code in your original question looks ok to me.  The code in the image doesn't as there's no Text object under the hide subform.

Are you getting any errors/exceptions when you preview?

Here's a sample that I think does what you are trying to do.

https://sites.google.com/site/livecycledesignercookbooks/home/WCtech.pdf?attredirects=0&d=1

You do need this on the master page?

Bruce

Avatar

Level 1

OMG! How stupid. So I can't have the Radio in subform and still control another subform next to it...

I recreated what you have and my file works. The only difference in yours is the Radio isn't in a subform