1 Reply Latest reply on Mar 8, 2011 4:45 PM by philmodjunk

    Dialog Box on Radio Button Select

    DanielClark

      Title

      Dialog Box on Radio Button Select

      Post

      I have a two element value list for a radio button control on one of my layouts, that when the buttons are selected or changed, a variable is set. I am trying to make it so that when the user clicks on the other choice (the button not pressed currently), a dialog box comes up asking for confirmation (are you sure you want to do this? ok, cancel). Then when the user clicks ok, the radio button changes selection. How can I do this? Thanks.

        • 1. Re: Dialog Box on Radio Button Select
          philmodjunk

          You can use an OnObjectModify trigger on the radio button field to run a script:

          #assuming two radio button values "yes" and "no". Subsitute the actual values in your solution

          Show custom Dialog ["Change to " & YourTable::yourradiobuttonfield & "?"]
          If [Get (LastMessageChoice) = 2 /* cancel was clicked */]
              # reset radio button field to original value.
             Set Field [ YourTable::YourRadioButtonField ; If ( YourTable::YourRadioButtonField = "Yes" ; "No" ; "Yes" ) ]
          End IF