Adding "destination" attribute to feedback form class ?

Author Message

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 -> sales@mysite.com, Marketing -> marketing@mysite.com, Direction...etc 


When submiting the form, the email would go directly to the choosen destination overriding the site.ini EmailReceiver=default@mysite.com

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 collector
where 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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.