7 Replies Latest reply on Apr 16, 2010 7:00 AM by kglad

    forms to email

    fallingdl7 Level 1

       

       

      I am trying to create a form in flash action script 2.0 for a web site I am building. I cannot get my form which has a name area, company name area, phone # area, email area (to contact them), and a question area. It is going to a dedicated email address and not to a sever. I don’t know how to get the form to send right.

        • 1. Re: forms to email
          kglad Adobe Community Professional & MVP

          relevant code?


          • 2. Re: forms to email
            fallingdl7 Level 1

            on (release) {


                     if (name eq "" or comp eq "" or phone eq "" or email eq "" or informaiton eq "") {
                           stop();
                     } else {
                     loadVariablesNum("dlewis824@gmail.com", 0, "POST");
                     gotoAndStop(8);
                 }
            }

             

            on (release) {
                name = "";
                comp="";
                phone="";
                email="";
                info="";
            }
            • 3. Re: forms to email
              kglad Adobe Community Professional & MVP

              there are several problems with that code.   to start, don't attach code to objects.  ie, remove all the code you have attached to your email button, give your email button an instance name (eg, emailBtn) and use

               

               

               

              emailBtn.onRelease=function(){

                 if (name != "" && comp != ""  && phone != "" && email != "" &&  information !=  "") {

              body = "name:  "+name+"\ncomp: "+comp+"\nphone: "+phone+"\nemail: "+email+"\ninfo:  "+information

              getURL ("mailto:  dlewis824@gmail.com?subject=emailt&body="+body);

              name=comp=phone=email=info="";

              gotoAndStop(8);

              }

              }

              • 4. Re: forms to email
                fallingdl7 Level 1

                I did what you said and the problem is that it pops up a email box and it filled with this

                name:  <TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial Baltic" SIZE="14" COLOR="#666666" LETTERSPACING="0" KERNING="1"><B>1</B></FONT></P></TEXTFORMAT>comp: <TEXTFORMAT  LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial Baltic" SIZE="14" COLOR="#666666" LETTERSPACING="0"  KERNING="0">2</FONT></P></TEXTFORMAT>phone: <TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial Baltic" SIZE="14" COLOR="#666666" LETTERSPACING="0" KERNING="0">3</FONT></P></TEXTFORMAT>cmail: undefinedinfo:  <TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial Baltic" SIZE="14" COLOR="#666666" LETTERSPACING="0" KERNING="0">5</FONT></P></TEXTFORMAT>

                It will be a problem with the person that has to responded to the email to read this.

                • 5. Re: forms to email
                  kglad Adobe Community Professional & MVP

                  don't use html-enabled textfields and make sure kerning is unchecked.

                  • 6. Re: forms to email
                    fallingdl7 Level 1

                     

                     

                     

                    great that worked the only thing that is strange is that it open an email when you hit the submit button and it also clumps the information in one line. like name:  1comp: 2phone: 3email: 4info:  5 is there any way to make them go on there on line.

                    • 7. Re: forms to email
                      kglad Adobe Community Professional & MVP

                      use:

                       

                      emailBtn.onRelease=function(){

                         if (name != "" && comp != ""   && phone != "" && email != "" &&  information  !=  "") {

                      body =  "name:  "+name+"%0Acomp: "+comp+"%0Aphone: "+phone+"%0Aemail:  "+email+"%0Ainfo:  "+information

                      getURL ("mailto:  dlewis824@gmail.com?subject=emailt&body="+body);

                      name=comp=phone=email=info="";

                      gotoAndStop(8);

                      }

                      }

                       

                      p.s.  please mark this thread as answered.