Forums / Setup & design / Modifying the sender email in feedback form

Modifying the sender email in feedback form

Author Message

Xtian Xultz

Wednesday 09 March 2005 9:21:53 am

Hello!
The feedback form have a configuration about the sender email address and the recipient address. I didnt understand why of this.
So, when a user sends me a message via feeedback form, I receive an email in the address of the recipient from the email configured as send email, and inside the text is the email of the user (that he typed in the feedback form).
Is there a way that the incoming email comes to my recipient email addres, but with sender email == the user email? So, I just need to do a reply to the message to talk back to my user.

Thanx in advance for any suggestion.

Ɓukasz Serwatka

Friday 11 March 2005 1:39:33 am

Hi,

You can do this by changing the template for the feedback form, you will need to set the email_sender template variable e.g if the first (0) attribute is the email address

{set-block scope=global variable=email_sender}
    {$collection.attributes.0.data_text}
{/set-block}

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

J-A Eberhard

Friday 07 October 2005 9:45:07 am

Are you thinking of the feedback_form.tpl what is in
templates/collectedinfomail/ or in node/view/full/ ?
J-A Eberhard

Open Source Solution Provider
Open-Net Ltd Switzerland
http://www.open-net.ch

Matthew Carroll

Tuesday 11 October 2005 4:17:21 pm

J-A Eberhard: yes, the template you need to customise to make this work is templates/collectedinfomail/feedback_form.tpl

I now have my feedback form sending to the contact person for our site 'from' the site user, also with the subject line set. $collection.attributes follows the order of the information in the feedback_form class, so for for me (and for the standard feedback_form class):

$collection.attributes.0.data_text = subject
$collection.attributes.1.data_text = message
$collection.attributes.2.data_text = email

As an example, here is my customised template:

{set-block scope=root variable=subject}New Enquiry: {$collection.attributes.0.data_text}{/set-block}
{set-block scope=root variable=email_receiver}{$object.data_map.recipient.content}{/set-block}
{set-block scope=global variable=email_sender}{$collection.attributes.2.data_text}{/set-block}
{* Set this to redirect to another node
{set-block scope=root variable=redirect_to_node_id}2{/set-block}
*}
Hi there, this is the automated Ban Terminator website
contact form here, with another happy enquiry for you to
follow up on. You should be able to reply to this email,
and it will go straight to them.

Here are the details they entered on the website:

----------------------------------------------------------

email address: {$collection.attributes.2.data_text}
subject: {$collection.attributes.0.data_text}

message:

{$collection.attributes.1.data_text}

finally, a very useful page from the old docs is here:

http://ez.no/products/ez_publish_cms/documentation/customization/components/information_collection

http://carroll.org.uk

Kevin Compton

Friday 02 March 2007 10:49:03 am

sorry to resurect this, but I have the same issue. I'm also an idiot, so I was hoping someone could see my code then tell me what I need to change in it to fix it for having the sender appear as the person who submitted the form, instead of it being my e-mail address every time.


{set-block scope=root variable=subject}{"Collected information from %1"|i18n("design/base",,array($collection.object.name|wash))}{/set-block}

{set-block scope=root variable=email_receiver}{$object.data_map.recipient.content}{/set-block}

{* Set this to redirect to another node
{set-block scope=root variable=redirect_to_node_id}2{/set-block}
*}

{"The following information was collected"|i18n("design/base")}:

{section name=Attribute loop=$node.data_map}



{if and(ne($Attribute:item.contentclass_attribute_name,'Recipient'),
ne($Attribute:item.contentclass_attribute_name,'Name'),
ne($Attribute:item.contentclass_attribute_name,'Description'))}

{if eq($Attribute:item.contentclass_attribute_name,'Vibration Transducers')}
	<br /><strong>I am interested in:</strong><br />
{/if}

{if eq($Attribute:item.contentclass_attribute_name,'Utility')}
	<br /><strong>Company Description Profile:</strong><br />
{/if}


{$Attribute:item.contentclass_attribute_name|wash}:
{attribute_result_gui view=info attribute=$:item}

{/if}
{/section}

Xavier Serna

Tuesday 06 March 2007 3:31:28 am

Its simple enough, you have to add this line to set the email sender:

{set-block scope=global variable=email_sender}{$collection.attributes.2.data_text}{/set-block}

and replace {$collection.attributes.2.data_text} with your attribute of the form, where the user enters his email.

hope this helps!

--
Xavier Serna
eZ Publish Certified Developer
Departament de Software
Microblau S.L. - http://www.microblau.net
+34 937 466 205

Kevin Compton

Tuesday 13 March 2007 2:04:30 pm

this didn't work.

Do I need to put this text you gave me in a certain specific location within the file?

Perhaps I put the wrong attribute for the sender?

Heres what i put in

{set-block scope=root variable=email_receiver}{$object.data_map.recipient.content}{/set-block}

Xavier Dutoit

Tuesday 13 March 2007 9:57:29 pm

Haven't tried, but what you write hasn't the same scope than the examples (root vs. global).

X+

http://www.sydesy.com