Forums / Setup & design / Adding "destination" attribute to feedback form class ?
H-Works Agency
Monday 13 November 2006 4:04:22 pm
Hi all,
How can i add a "Destination" field to my feedback form class ?
Its very often usefull for companies website to allow users to choose which service they want to send the message to.
For exemple :
Attribute Type : selection Attribute Name : Destination Service Values : Sales -> [email protected], Marketing -> [email protected], Direction...etc When submiting the form, the email would go directly to the choosen destination overriding the site.ini [email protected]
Thanx for help in advance.
MH
EZP is Great
Claudia Kosny
Tuesday 14 November 2006 12:43:50 pm
Hi Martin
If you check the standard template for feedback you can see that there is an option to set the email receiver here. So give your infocollection form an ezselection with all the departments as options so the users of your form can select the destination service. Then just adapt you mail template so that the email receiver variable is set depending on whatever selection your user made. The only problem is to get the email addresses that relate to each department. To do that I see several options: - set up an ini file that maps departments to their emailaddresses (that's what I would do) - hardcode the email addresses in your mail template - give your info collection form an additional matrix attribute that is not an info collectorwhere each line is a map from department to email address (might not work and is a bit confusing)
A problem with this approach is that the receiver's email address is not stored in the infocollection table but hopefully this is not to important.
Good luck
Claudia