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.

Invisible/hidden to visible with specific radio button? Please help.

Avatar

Former Community Member

I'm sure someone else has already posted the answer, but I'm pretty new to Adobe, so I'm probably not searching for the right thing which is keeping me from finding it.

First, my goal.  I want to be able to click on a radio button and have everything below it slide down and the subform holding a TextField appears below it to enter why you clicked that radio button.

I feel like I've almost got it figured out using:

script.PNG

The problem I am having with this is it shows up all the time unless I click the radio button, then it disappears.  Clicking off the button does not bring the TextField back.  I tried switching the presence between the two, but then nothing happens at all.

As I understand it I would need to use invisible instead of hidden for the information below to move up and down, but I'm taking baby steps.  Never taken any classes or had anyone teach me how to use LiveCycle or Acrobat and there seems to be a pretty steep learning curve.

I couldn't figure out how to put my file on here, so I put it at the locations below.  Any help is greatly appreciated!!  Thanks.

http://www.filedropper.com/newncn2

10 Replies

Avatar

Level 6

Since this is related to scripting in LiveCycle Designer, I moved it over there.

Avatar

Level 7

you have put your script in the click event so the presence state won't be effected until the button is pressed. Try putting your script into the 'layoutReady' event or starting off with the presence set to hidden and then it will only become visible when the button is clicked.

Avatar

Former Community Member

When I use the "find" function I'm not able to find any "layoutReady" in the XML Source tab.  Is there something else I should be looking for?  Thanks a lot for your reply!

Avatar

Level 7

the xml looks like:

<event activity="ready" ref="$layout" name="event__layout_ready">

Avatar

Former Community Member

The only occurance of layout is:

 

<subform name="form1" layout="tb" locale="en_US">

Do I need to add a line for this event?

Avatar

Level 7

Are you using Livecycle Designer? If so you will be able to add an event in the design view rather than doing everything through xml. You can get the script editor up by pressing ctrl + shift + f5 on a PC and then put the script in there.

Avatar

Former Community Member

Wow, that's extremely helpful.  I'm been navigating through XML trying to learn a language I've never seen before.  I'll try that and get back soon.

Avatar

Former Community Member

Actually, I just figured it out.  The raw value, when working with radio buttons, needs to be the integer of the button you are working on.  Also, have to use way more subforms than I've been using because the overall form has to be flowed, not positioned.  I'm putting all the coding in now, then I'll post the completed form for people to use as a reference if they have the same question I did.

Avatar

Former Community Member

Here is the final version of the form.

http://www.filedropper.com/cleanform

Good luck everyone, and thanks very much whyisthisme.