Bez
1
Hi Guys,
I have created an email from in flash and php, but i would like it to have error fields.
So if somebody doesn’t type a @ in the email field it will say
“Please provide a valid email address”
And the same type of idea for the Name and Comments filed.
But, I dont now how to do this. Would anybody be kind enough to help me?
Thanks in Advance
system
3
Hi Kax,
i appreciate the reply, But i would need help setting it up.
If i posted my Php and .Fla here, could you add them for me?
system
4
Ehmm… yeah, I guess I could do that… :whistle:
system
5
Hi Kax,
I would just like an error message to appear on the form if the user types nothing in at all, and if they dont type in an @ and . in the email field
So there is an error message for each field:
Please enter your name
Please enter a valid email address
and
Please leave some comments
Thanks
system
6
Here’s something quick… I have to go. :-
[AS]checkForm = function () {
var error;
if (!name_txt.length) {
name_txt.text = “Please enter your name”;
error = true;
}
if (!email_txt.length || email_txt.text.indexOf("@")<1 || email_txt.text.indexOf(".")<3) {
email_txt.text = “Please enter a valid email address”;
error = true;
}
if (!comments_txt.length) {
comments_txt.text = “Please leave some comments”;
error = true;
}
return !error;
};
form_btn.onRelease = function() {
if (checkForm()) {
mail_lv = new LoadVars();
mail_lv.msg = comments_txt.text;
mail_lv.name = name_txt.text;
mail_lv.email = email_txt.text;
mail_lv.send(“form.php”);
}
};[/AS]
system
9
Also, I dont suppose you could help me add a
“Sending Email…Please Wait”
and
“Email Sent”
Could you?
system
11
Thanks again Kax,
But theres one more thing,
Could you explain how you did this?
As i would like to write a tutorial on how i created this form.
Regards
system
12
Also,
I just uploaded the form you modified, And when i press submit, I get Sending email please wait
And then it says Error
Even though i recieve the emai :crazy:
system
13
I just tested it on my server, it works fine for me. 
And if you want to write a tutorial on how YOU created this form…
You can start here… http://www.kirupa.com/developer/actionscript/asandphp.htm

system
14
Hey Kax,
Heres my email form
Look at it, It doesn’t work 
Even though it still sends the emails
Craig 
system
15
I got a 404 error. :sigh:
system
17
Nope… I’m not a big fan of instant messaging.
system
18
Thats very wierd,
What are the reasons for it saying “Error” when the email sends?
system
19
Ok Kax,
The server is back up again now
Take a look at it