Yet another lesson about assuming things
So last night I was putting together a simple contact form (I know I keep saying “simple” a lot, but I’ve been out of the Flash loop for a while, so I’m just taking it easy! 🙂 ). All I’m doing is making a contact form that will take customer input and send variables via GET to a PHP page. The PHP page then sends us the info using email. Very easy.
It was all straightforward, until I started adding radio button groups, which I have to admit I don’t think I’ve done before, at least not in Flash. I didn’t know how to get the info from the radio buttons into variables. I could figure out the object parameters easily enough, but there is no parameter for button name. All I could think was that the groupName was the parameter to send the data. That did send info in the email, but it was gibberish.
I tried looking up Flash radio buttons online, but didn’t find any good info right away. After much looking around I found where my code was going wrong. I was using the following line to try to pass the data:
varSendVariables.radioGroup = radioGroup;
I found some slightly different code online and finally got my form to work using this code instead:
varSendVariables.radioGroup = this.radioDeadline.radioGroup();