5 Replies Latest reply on Mar 21, 2014 3:32 PM by philmodjunk

    Automated Radion Buttons



      Automated Radion Buttons


           I have 4 radion buttons aligned next to each other in a Form. 

           How do i ensure that there can never be two (or more) of these 4 buttons checked at the same time? There should always be just one checked.   

           So the idea is that whenever i check one of the 4 buttons, the 3 other ones will automatically uncheck themselves. And this should happen each time i pick another one of the 4.

           How is that achieved?   

           Much appreciated.


        • 1. Re: Automated Radion Buttons

               If this is a single field with 4 radio button values, this happens (with one exception) automatically. Selecting one value will clear any previously selected value. The only way to select more than one value would be to hold down the shift key while clicking a different radio button.

               And if this is a single field, a simple auto-enter calculation can prevent even a shift click from selecting a second value:

               Getvalue ( Self ; ValueCount ( self ) ) //clear the do not replace existing value check box

          • 2. Re: Automated Radion Buttons

                 sorry, i wasn't clear.  Right now,  it's 4 different and totally separate fields actually.  And that's how i had planned it.  For now. :)

                 Actually i know i can have 4 or more values for one radio button and for one field.  But i wouldn't know how i could obtain 4 radio buttons from one single field?

            • 3. Re: Automated Radion Buttons

                   It doesn't sound like you should use separate fields for this. That seems a needless complication.

                   Go to Manage | Value lists. Create a value list. Specify the 4 values that you need as values for this value list

                   Then go to your layout and enter layout mode.

                   Select the field where you want the 4 radio button options and use the Inspector's data tab to specify a radio button format and to specify the value list that you just created.

                   Then resize the field as needed until all for radio buttons are visible.

              • 4. Re: Automated Radion Buttons

                     Great stuff, i had no clue and did indeed complicate this beyond belief!  Thanks for that.

                     Quick one, the value labels appear next to each button.  Is it possible to make them appear on top of each button?

                • 5. Re: Automated Radion Buttons

                       If you want to work at it a bit. Define 4 single value value lists for the 1 field. Make for copies of the field and format each copy with a different single value value list. Then resize the fields so that only the radio button, not the value is visible. Use Label text to put the button label back as an object above each copy of this field.

                       Not sure it's worth it, might be simpler to put 4 scripted buttons on your layout to set the same field to different values, but it would do what you asked.