A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: flash mx form php

  1. #1
    Senior Member
    Join Date
    Mar 2003
    Posts
    316

    flash mx form php

    hi,

    just trying to work out how to do a mailer form with flash for php.
    I got the basics going but how does it work with check boxes and radio buttons ???

    so far I used this code for input fields
    $mailsend = mail($address, "Contact >>Enrolment", "<font face='arial'><b>Enrolment:</b></font><font face='arial' size='2'><br><br><b>Name of applicant:</b> $enameOfAp ... etc ...</font>" , "From: $email\r\nContent-type: text/html");
    but this doesn work with other elements as I get [object][object]
    in my mailed output. Any tips on what to do ?

    cheers

  2. #2
    Senior Member
    Join Date
    Mar 2003
    Posts
    316

    nothing?

    Is it possible ? I can't find any info on this anywhere it's gotta be doable???

    anyone ?

  3. #3
    Senior Member
    Join Date
    Aug 2001
    Posts
    140
    I'm waiting on the same thing, but lately nobody answers any questions of mine, I don't know why.

    :-(

  4. #4
    Senior Member
    Join Date
    Mar 2003
    Posts
    316

    solution

    Hi
    I worked this out a while ago a just forgot to post back well thought no one is reading the post.

    You have to predefine your elements for example

    //checkBox1 - varibale tracking state of checkbox
    checkBox1="No"; etc..
    //radioSmall - instance name of radio button
    radioSmall.setData("small"); etc...

    //u need handler to detect when radio is selected
    //and then call function (in my case "getRadio()" to collect value
    //small - is the name of the radio buttons group
    small.setChangeHandler("getRadio");

    //Now this is how you get the value from your radio group
    //(so u know which value was selected and needs to be sent to php)

    function getRadio() {
    //myRadioSize is just a variable I use to store the value
    myRadioSize = small.getValue();
    }

    CHECKBOXES??? now this is tricky here is the code
    //-------------------------------------------------
    //need listener again

    myCheckboxListener = new Object();
    myCheckboxListener.click = function (eventObject)
    {
    //if checkbox selected assign value yes
    if (check1.selected)
    //check for state of chkbox instance check1 and store in checkBox1
    { checkBox1 = check1.getValue() ? "No" : "Yes";}
    else
    //if checkbox deselected assign value no
    { checkBox1 = check1.getValue() ? "Yes" : "No"; }
    }
    //add listener
    check1.addEventListener("click", myCheckboxListener);

    then on your submit button you need something like

    //you can check some state here like I do using
    // getState to see if true or false
    if(!myRadio.getState())
    {
    //send variables to php page
    loadVariables ("ProcessForm.php", "", "POST");
    }
    else{ //redirect to some page }

    then u can collect your variables in PHP just using normal $checkBox1 $myRadioSize etc...

    Hope it helps it's quite a long process wish it was more automated...


    Cheers

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center