These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Radio Button - Wierd Action

EdwardKuk
Registered: May 14 2010
Posts: 26
Answered

Hi Everyone,

I have a radio button with 5 options. What I want to do is to make a subform visible when the 5th one is selected and hidden when the other 4 options are selected. The following is my code:

if (this.rawValue == "1"|| this.rawValue == "2" || this.rawValue == "3" ||this.rawValue == "4")
{
MainPage.Body.Signature.Disclaimer.presence = "hidden";
}
else
{
MainPage.Body.Signature.Disclaimer.presence = "visible";
}

I was testing the form and noticed that if I START off by alternating between option 5 and any one of the other options, "Disclaimer" turns on and off properly. HOWEVER, if I select an option from 1-4, and then I select ANOTHER option from 1-4 (obviously different than the first), and then Finally select option 5, disclaimer does not turn on. The only want to make disclaimer appear is to hit the reset button and then select option 5. However, if I follow do the same thing as before, the same problem occurs.
Has anyone had this problem before?

Any help will be greatly appreciated.

Thanks,
Edward Kuk

radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Hi,

you better put the control mechanism into the layourt:ready event of the form object that should be hidden/vissible.
Reference to the whole radio button group instead of the single radio buttons.

Such as:
if(RadioButtonGroup.rawValue == "1"){this.presence = "hidden";}else{this.presence = "visible";}

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs