-
1. Re: contact form submit button triggering JS?
Paul_C_B Jun 16, 2013 2:14 AM (in response to Rick_Wolff)id love to see that im struggling with an email form right this moment with a deadline looming
www.avatarea.com/snseurope14
on the contact us page its currently calling an email client but even that has all the data returns as a single string but id rather it be php
regards Paul
-
2. Re: contact form submit button triggering JS?
resdesign Jun 16, 2013 5:46 AM (in response to Paul_C_B)Did you check out this?
http://www.w3schools.com/php/php_mail.asp
I suppose you could implement this in Edge.
-
3. Re: contact form submit button triggering JS?
Paul_C_B Jun 16, 2013 5:56 AM (in response to resdesign)i have a php set up on the site now
www.avatarea.com/snseurope15
but for some reason its not sending me the email
-
4. Re: contact form submit button triggering JS?
resdesign Jun 16, 2013 5:58 AM (in response to Paul_C_B)Could you post you code?
-
5. Re: contact form submit button triggering JS?
Paul_C_B Jun 16, 2013 6:09 AM (in response to resdesign)whats your email ill send you a dropbox invite
mines paul@avatarea.com
-
6. Re: contact form submit button triggering JS?
Rick_Wolff Jun 16, 2013 6:25 AM (in response to resdesign)I've been giving it some thought, and rather than forcing the Edge Animate comp to listen to the PHP script or getting the PHP to speak JavaScript, I'm just going to make a div with a "Thanks" message within the encompassing div, set it to hidden initially, and make the PHP reset it to visible once it's finished composing and sending the email. So it's now purely a PHP issue.
Don't know if that's a solution for Paul_C_B. -
7. Re: contact form submit button triggering JS?
Paul_C_B Jun 16, 2013 6:52 AM (in response to resdesign)this is whats associated with the txt fields:-
$("<input type='text' id='Email' name='Email' tabindex='1' maxlength='200' style='background-color:white; border:1px solid black' required>").appendTo(sym.$("emailbox"));
$("<input type='text' id='Firstname' name='first_name' tabindex='2' maxlength='200' style='background-color:white; border:1px solid black' required>").appendTo(sym.$("firstnamebox"));
$("<input type='text' id='Lastname' name='last_name' tabindex='3' maxlength='200' style='background-color:white; border:1px solid black' required>").appendTo(sym.$("lastnamebox"));
$("<input type='text' id='Telephone' name='tel_number' tabindex='4' maxlength='200' style='background-color:white; border:1px solid black' required>").appendTo(sym.$("telephonebox"));
$("<input type='text' id='City name='city' tabindex='5' maxlength='200' style='background-color:white; border:1px solid black' required>").appendTo(sym.$("citybox"));
$("<input type='text' id='Country' name='country' tabindex='6' maxlength='200' style='background-color:white; border:1px solid black' required>").appendTo(sym.$("countrybox"));
$("<textarea type='text' id='Message' name='message tabindex='7' cols='30' rows='4' maxlength='200' style='background-color:white; border:1px solid black; overflow:auto; resize:none; ' required></textarea>").appendTo(sym.$("messagebox"));
this is on the submit button:-
// insert code for mouse click here
var emailFromVal = Email.value;
var messageVal = "<strong><p><font face='helvetica' size='5'> Name : "+Firstname.value+"<br><br> Last Name: "+Lastname.value+"<br><br> Tel : "+Telephone.value+"<br><br> City: "+City.value+"<br><br> Country: "+Country.value+"<br><br> Message : "+Message.value+"</p>";
// we add this variable to make sure if anyone find out the address of our php file cant send empty message by calling php file by url
var Permission = 1;
$.post("sendEmail.php",{ flag:Permission, email:emailFromVal, message:messageVal });
and this is the PHP file sendEmail.php :-
<?php
if ( $_POST['flag'] == 1 ){
$to = 'paul@avatarea.com';
$subject = 'SnS Europe';
$message = $_POST['message'] . "\r\n";
$headers = 'From: ' . $_POST['email'] . "\r\n" .
'MIME-Version: 1.0' . "\r\n" .
'Content-Type: text/html; charset=UTF-8' . "\r\n" .
'Reply-To: ' . $_POST['email'] . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
}
?>
-
8. Re: contact form submit button triggering JS?
resdesign Jun 16, 2013 7:26 AM (in response to Paul_C_B)Paul l will look at it later tonight. (It is Father's day here!) You should be able to post a link to your dropbox file and you can pm it to me if your want to keep it private. You probably should delete your post with your email to avoid crawlers to get it.
-
9. Re: contact form submit button triggering JS?
resdesign Jun 18, 2013 8:15 AM (in response to resdesign)Paul,
Sorry, but I am not sure why it is not working. Your code looks right to me.
-
10. Re: contact form submit button triggering JS?
Paul_C_B Jun 18, 2013 1:09 PM (in response to resdesign)id='City name='city' see the first City has no closing '
that was it ))
-
11. Re: contact form submit button triggering JS?
resdesign Jun 19, 2013 5:04 AM (in response to Paul_C_B)Awesome. I am so glad you found the problem. Sorry I missed it.
-
12. Re: contact form submit button triggering JS?
mousssss Jan 28, 2016 12:25 PM (in response to resdesign)hello
is their any links where i can download the above example?
i have tried to implement all the above in my adobe edge CC
but the symbol did not transformed into n input text!!