4 Replies Latest reply on Sep 6, 2011 5:23 AM by pguerett

    Radio Buttons

    brcs89

      I have the following radio button groups.  They are mutually exlisive so you can select either "10 or Less" (Checkbox1) or "More Than 10" (Checkbox2)  and either Yes or No.  Is there any way to set these up to where only the Yes or No beside either Checkbox1 or Checkbox2 can be selected depending on which is selected?

       

      Radio Buttons.jpeg

       

       

       

        • 1. Re: Radio Buttons
          pguerett Level 6

          Put the 10 or Less and More than 10 in one group and the Yes and no on line

          one in a second group and the yes and no on line 2 in a 3rd group. Then

          you woudl have to write code on the exit event of the 1st group that woudl check which one was selected and sim

          ply disable the other group. On teh exit event of the views group you coudl write code like this:

           

          if (this.rawValue == "Value for 10 Views or less"){

               Group2.access = "open";

               Group3.access = "readOnly";

          } else {

               Group2.access = "readOnly"

               Group3.access = "open"

          }

           

          Note that the default for Group1 and 2 shoudl be readOnly so that the user cannot select an option before chosing a Group 1 value

           

          Make sense?

           

          Paul

          • 2. Re: Radio Buttons
            brcs89 Level 1

            That works awesome.  Thank you so much.

            • 3. Re: Radio Buttons
              brcs89 Level 1

              I have another question on this issue.  I have the code below which works great however I was wondering if there was a way to clear either RadioButtonList2 or 3.  If you select 10 Views and then select yes or no and change to More than 10 views the yes or no on the 10 views line is still selected (see below).  Is there a way to clear this?

               

              if

               

              (this.rawValue == 1){

                

              RadioButtonList2.access

              = "open";

                

              RadioButtonList3.access

              = "readOnly";

                

              }

              else {

                

              RadioButtonList2.access

              = "readOnly"

                

              RadioButtonList3.access

              = "open"

                

              }

                

              10 Views.jpeg

                

              • 4. Re: Radio Buttons
                pguerett Level 6

                Sure just set the RadioButtonList rawValue property to "". This will clear the selection.

                 

                Paul