3 Replies Latest reply on Mar 14, 2011 1:22 AM by George_Johnson

    radio button problem

    Formzet - Zoetermeer Level 1

      I've got 3 radio buttons.

      Button 1 and 2 can be activated together.

      But when i select button 3 the buttons 1 and 2 must be deactivated

      And when i select button 1 and/or button 2, then button 3 must be deactivated.

      The additional text fields must be deactivated to.




      O Button 1                        O Button 3
        [text field1]                     [text field1]
        [text field2]                     [text field2]
                                          [text field3]
      O Button 2
        [text field1]
        [text field2]
        [text field3]


      Anyone who can help me how to do this with javascript?

      I know how to get the values of the buttons, bot not how to link al these buttons

        • 1. Re: radio button problem
          gkaiseril MVP & Adobe Community Professional

          Exactly do you mean by deactivate?


          It appears you use this term twice in your question with possible 2 different contexts.


          You write about deactivating the radio buttons and the fields. Does this mean in the same manner?


          You deactivate text fields by making them read only. Do you want to do this with the radio buttons?


          Once a radio button is selected, it can not be de-selected by clicking on it, it will only be de-activated by clicking on another radio button within the exclusionary group. What you have proposed will mean if a user makes the wrong choice among these 3 buttons, the user can not correct their error.

          • 2. Re: radio button problem
            Formzet - Zoetermeer Level 1

            sorry for the confusion.


            buttons must be turned on and off, so i must be using check boxes i think (my english is not that good).

            i used the right boxes, because i already can turn them on and off.

            the problem is the javascript.


            Looking at my example above, button 1 and 2 can be selected at the same time.

            But when button 3 is selected, button 1 and 2 cannot be checked.


            So, the following selections must be posible

            - Only button 1

            - Only button 2

            - button 1 and 2

            - Only button 3


            Lets forget the textfields for now, i know how to show and hide these fields

            • 3. Re: radio button problem
              George_Johnson MVP & Adobe Community Professional

              In the Mouse Up scripts for both 1 and 2, set the value of 3 to "Off", and in the Mouse Up event of 3, set the value of 1 and 2 to "Off".