ChronoEngine Forums
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Email recipient based on user selection (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Email recipient based on user selection
#8249
coalescefl (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Email recipient based on user selection 1 Month, 3 Weeks ago Karma: 0  
Im trying to build a form that emails the form submission to a different person based on a selection list.

For example, the question reads:
I would like more information on:
- Real Estate
- Membership
- Choice 3
- Choice 4

If someone chooses option 1, a copy of the form is emailed to department 1, if option 2, a copy goes to department #2, etc.

Is something like this possible? Any help would be greatly apreciated.

Thanks
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#8257
admin (Admin)
Admin
Posts: 1570
graphgraph
User Online Now Click here to see the profile of this user
Re:Email recipient based on user selection 1 Month, 3 Weeks ago Karma: 22  
Possible, in the onsubmit before email :

Code:

<?php if($_POST['real_estate_field']){ $rows[0]->extraemail .= "rea_estate@yourdomain.com"; } ?>
and so... Cheers Max
 
Report to moderator   Logged Logged  
 
ChronoForms Developer Thanks for using ChronoForms.
If you have any problems with ChronoForms please tell us.
If you like ChronoForms please post a review at Joomla.org
  The administrator has disabled public write access.
#8259
mancourt (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Re:Email recipient based on user selection 1 Month, 3 Weeks ago Karma: 0  
Thank you for your prompt reply! However it's not working =/

I tried the above code and modded it to this to fit the value name:
Code:

<?php if($_POST['real_estate']){ $rows[0]->extraemail .= "email@domain.com"; } ?>
Also the page in question can be found here: http://goldenocala.coalescecreative.com/index.php/component/chronocontact/?chronoformname=contact_form Also here is the bit of the form that's pertinate:
Code:

<select name="more_info" size="4" multiple id="more_info"> <option value="real_estate">Real Estate</option> <option value="membership">Membership</option> <option value="banquet">Banquet/Catering</option> <option value="employment">Employment</option> </select>
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/05/13 20:25 By mancourt.
  The administrator has disabled public write access.
#8314
admin (Admin)
Admin
Posts: 1570
graphgraph
User Online Now Click here to see the profile of this user
Re:Email recipient based on user selection 1 Month, 3 Weeks ago Karma: 22  
Hi, sorry my mistake, make this line like this :

Code:

$rows[0]->extraemail .= ",rea_estate@yourdomain.com";
cheers Max
 
Report to moderator   Logged Logged  
 
ChronoForms Developer Thanks for using ChronoForms.
If you have any problems with ChronoForms please tell us.
If you like ChronoForms please post a review at Joomla.org
  The administrator has disabled public write access.
#8354
mancourt (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Re:Email recipient based on user selection 1 Month, 3 Weeks ago Karma: 0  
Max, thank you again for your reply. Still no dice on the extra E-mails coming in. The primary E-mail is receiving everything fine, just not the ones in here:

<?php
if($_POST['membership']){
$rows[0]->extraemail .= ",email@domain.com";
}
?>

Any other ideas? Thank you
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#8364
GreyHead (Admin)
Admin
Posts: 2809
graph
User Offline Click here to see the profile of this user
Re:Email recipient based on user selection 1 Month, 3 Weeks ago Karma: 59  
Hi mancourt,

I'd add a line of diagnostic code in there:
Code:

<?php if ( $debug ) { echo "extraemail: "; print_r($rows[0]->extraemail);echo "<br />"; } if ( $_POST['membership'] ) { $rows[0]->extraemail .= ",email@domain.com"; if ( $debug ) { echo "extraemail: "; print_r($rows[0]->extraemail);echo "<br />"; } } ?>
when debug is on this should print out a line showing you what's in 'extraemail' before and after the change. Bob
 
Report to moderator   Logged Logged  
 
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop


equalheight If you have any questions you can post to our forums and we will be glad to help ASAP

Members Login






Lost Password?
No account yet? Register

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for
goods and services provided by ChronoEngine.com

ChronoForms License

equalheightTo be able to continue working at this component we decided to get a small profit out of it but at the same time don't force everybody to pay in order to use this great component.

 

 From version 1.5 and up a link at the bottom of everyform created will be placed, saying "joomla professional work", the link will be to us here htttp://www.chronoengine.com, its illegal to remove this link from the source code unless you have a license,

so the license is very simply for the same ChronoForms component without a link, thats all!

This License is for 5 different websites ONLY. 

 

 However, in order to allow everybody to still use the component and even get out of this, the link is inside a div with class : chronoform , use this to hide the link by using different colors or whatever if you really can't pay, but of course the link is still exists at your page source.

 

The license is ONLY 25$ can be bought here :

 

Thank you!

 

ChronoEngine.com Team 

Joomla Templates and Joomla Tutorials