Jump to content


Photo

Contact Form Help


  • Please log in to reply
No replies to this topic

#1 codeoverride

codeoverride

    Young Padawan

  • Members
  • Pip
  • 4 posts

Posted 01 October 2009 - 05:18 PM

The contact form sends email out even if not all the fields are filled in. I need to change it so that it will only proceed if all fields are filled in.

This is what I have right now:

on (release) {
// send variables in form movieclip (the textfields)
// to email PHP page which will send the mail
form.loadVariables("email.php", "POST");
}


This is what I found online:

on (release) {
if (form.name_txt.text == "" || form.email_txt.text == "" || form.body_txt.text == "") {
// do whatever. one of the textfields is empty
} else {
form.loadVariables("send.php", "POST");
play();
}
}

I spent over two hours trying to implement this into my website (n00b ) but I can't get it to work. I've had all kinds of problems. Sometimes it seems like it won't send the email but then when I upload it and try it out online it does!

This is what my latest attempt looks like:

on (release) {
if (form.name_txt.text == "" || form.email_txt.text == "" || form.message.text == "") {
gotoAndStop(7);
} else {
form.loadVariables("email.php", "POST");
}
}

It still sends the message. Even if not all fields are filled out.

Edited by codeoverride, 01 October 2009 - 05:18 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users