Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Uncheck RadioButtons

Avatar

Level 3

Hi there,

I have a question: is is possible to uncheck a radiobutton?

The form I´m working is to be filled electronically or if you want you can print it, so if by mistake you click on a radio I´d like to know if you can click it again to uncheck it (I know that you could close and open the form again, but you would have to fill it all again)

Any ideas?

Thanks!

01.png

02.png

03.png

1 Accepted Solution

Avatar

Correct answer by
Level 8

Use check boxes. Change the appearance to Sunken Circle. Let's say the check boxes are named CheckBox1 and CheckBox2. In the change event of CheckBox1 put:

CheckBox2.rawValue=0;

and for CheckBox2:

CheckBox1.rawValue=0;

Kyle

View solution in original post

7 Replies

Avatar

Correct answer by
Level 8

Use check boxes. Change the appearance to Sunken Circle. Let's say the check boxes are named CheckBox1 and CheckBox2. In the change event of CheckBox1 put:

CheckBox2.rawValue=0;

and for CheckBox2:

CheckBox1.rawValue=0;

Kyle

Avatar

Level 3

Kyle, thanks again!

I´ve thought that option, but I need that they work as RadioButtons. By replacing them for ChcekBoxes I´d have to code that If I choose YES I can´t choose NO and vice versa, or Am i missing something?    


Avatar

Level 8

Did you try the code I suggested putting in the change event for each check box?

Kyle

Avatar

Level 10

For radio buttons you can use "" to reset the value: radiobuttonlist.rawValue = "";

Avatar

Level 2

I need help with the same thing. I have a form with a group of two radio buttons. Users have the option of selecting one or the other but I need to give them the ability to de-select a radio button in case they complete the wrong section (which happens all the time). Where do I enter the above code? Any help is appreciated. I'm still pretty new at using Livecycle Designer.

Avatar

Level 3

you have to open de Script Editor (Window > Script Editor or Ctrl+Shift+F5), then select the object oyu want to have the code, in this example would be the checkbox and paste the code in the script editor

asd.jpg