Hi,
I’m building an online registration form for a youth sports league using ChronoForms. How do I set it up so that on submit an email with a custom layout is sent to the registrants (persons filling out the form) and a separate email with a different custom layout is sent to league administrators.
William
I’m building an online registration form for a youth sports league using ChronoForms. How do I set it up so that on submit an email with a custom layout is sent to the registrants (persons filling out the form) and a separate email with a different custom layout is sent to league administrators.
William
Hi William,
This isn't supported 'out of the box' but you can fairly easily do it by writing code to send the second email and putting it in the 'OnSubmit after email' box. Here's an example from another thread:
This isn't supported 'out of the box' but you can fairly easily do it by writing code to send the second email and putting it in the 'OnSubmit after email' box. Here's an example from another thread:
<?php
$recipient = $_POST['client-email'];
$html_message = "<p>Hi,</p>
<p>Thank you for filling out our customer survey.</p><p>If you have any question or
other comments, please let us know.</p>
<p>Nikhil<br />General Manager</p>
<p>DMC Car Care</p>";
$subject = $subject;
mosMail($from, $fromname, $recipient, $subject, $html_message, true, NULL, NULL, NULL, NULL, NULL );
?>
Bob
Thanks Bob,
I'll give it a try. Our form has three email fields: player, parent1, and parent2. To have the email sent to all three should the code look like this?
If the registrant does not fill out all the fields (i.e only parent1 email is provided on form) will the PHP code fail to send?
Regards,
William
I'll give it a try. Our form has three email fields: player, parent1, and parent2. To have the email sent to all three should the code look like this?
$recipient = $_POST['player'];
$_POST['parent1'];
$_POST['parent2'];
If the registrant does not fill out all the fields (i.e only parent1 email is provided on form) will the PHP code fail to send?
Regards,
William
Hi William,
You need the following code in the "OnSubmit before email" box:
Please test it and let me know if there are any bugs.
Bob<br><br>Post edited by: GreyHead, at: 2007/12/14 00:08
You need the following code in the "OnSubmit before email" box:
<?php
$rows[0]->extraemail = $rows[0]->extraemail.",".$_POST['player'].",".$_POST['parent1'].",".$_POST['parent2'];
?>
This should add the all three recipients to the existing array. Not very elegant I'm afraid.
Please test it and let me know if there are any bugs.
Bob<br><br>Post edited by: GreyHead, at: 2007/12/14 00:08
I want to send an email to 'email' and 'sec'.
I've tried the php-script, but it doesn't work.
Here's the beginning of my php-script.
What I'am doing wrong?
<?php
$rows[0]->extraemail = $rows[0]->extraemail.",".$_POST['email'].",".$_POST['sec'];
$from = $replyto_email ="'xxxx";
$fromname = $replyto_name = "Karel V";
$recipient = $_POST['email'];
$subject = "Registration .....";
$message = '
<html>
Regards
YLI
I've tried the php-script, but it doesn't work.
Here's the beginning of my php-script.
What I'am doing wrong?
<?php
$rows[0]->extraemail = $rows[0]->extraemail.",".$_POST['email'].",".$_POST['sec'];
$from = $replyto_email ="'xxxx";
$fromname = $replyto_name = "Karel V";
$recipient = $_POST['email'];
$subject = "Registration .....";
$message = '
<html>
Regards
YLI
Hi YLI,
this have completely changed in V3, this post is almost 1 year old, use 2 emails in V3.0 to do what you need, if you need more help then open a new topic please!
Regards
Max
this have completely changed in V3, this post is almost 1 year old, use 2 emails in V3.0 to do what you need, if you need more help then open a new topic please!
Regards
Max
Hi,
I'm just looking for a simple php code, to be used in chrono forms, to send the email form to 2 mailadresses: $recipient & [email]pietjepuk@hotmail.com[/email]. Please help me.
I'm just looking for a simple php code, to be used in chrono forms, to send the email form to 2 mailadresses: $recipient & [email]pietjepuk@hotmail.com[/email]. Please help me.
Hi YLI,
You don't need any PHP - just drag another To box into your email setup.
Bob
You don't need any PHP - just drag another To box into your email setup.
Bob
Hi Bob,
Sorry, but do you mean in the General tab?
Some posts earlier you'll see my php script from my email setup.
Sorry, but do you mean in the General tab?
Some posts earlier you'll see my php script from my email setup.
Hi Bob,
We're using Joomla 1.0.13 and do have a special field tab, but no email setup tab.
YLI
We're using Joomla 1.0.13 and do have a special field tab, but no email setup tab.
YLI
Hi YLI,
Ah! In that case . . . the *best* answer is to upgrade to Joomla 1.5.
If you can't do that then you'll need to add code in the OnSubmit Before box to add the second email. I'm sure that's in the forums here but many months back.
If you can't find it then ask again and I'll see if I can remember how the old version of ChronoForms works.
Bob
Ah! In that case . . . the *best* answer is to upgrade to Joomla 1.5.
If you can't do that then you'll need to add code in the OnSubmit Before box to add the second email. I'm sure that's in the forums here but many months back.
If you can't find it then ask again and I'll see if I can remember how the old version of ChronoForms works.
Bob
Hi Bob,
Thanks, but I'm searching this forum for months, but I'm not able to find the right solution.
Please, will you trying to remember how the old version of chronoforms works?
Yli
Thanks, but I'm searching this forum for months, but I'm not able to find the right solution.
Please, will you trying to remember how the old version of chronoforms works?
Yli
Hi Yli,
Search for "mosmail", this is the function which will do emails in the earlier version, so you should be able to find some posts which have this text!
Regards
Max
Search for "mosmail", this is the function which will do emails in the earlier version, so you should be able to find some posts which have this text!
Regards
Max
This topic is locked and no more replies can be posted.