1 Reply Latest reply on Apr 7, 2010 1:12 AM by celebritymusic

    How to set a default pre-select for radio buttons?

    celebritymusic Level 1



      I have some text form fields that I've set up to display some paired variables stored in a .txt file.  When the swf loads, the form fields are populated with the text.


      I've also set it up so that if you change the text and hit a submit button, the .txt file gets updated.


      I'm now tryng to set it up so that I can store radio button selections in the .txt file too.


      I've started doing it a certain way, but am wondering if there is a more straightforward way of doing ?


      Here's what I've done...


      I've set up the butttons to spit out "on" or "off" depending on the selection, and apply that to the variable that gets stored.


      Now, in the same way I loaded the variables into the text form fields when the swf is refreshed, I want to load the on/off variable, and then somehow apply it to the radio buttons so that one of them is pre-selected.


      So my questions are a) how do I take that loaded variable, and use an if statement to make it pre-select the button, and b) is there a simpler way to pre-select a button based on an external variable?