CC Feedback Form to Submitter

Author Message

Andrew Duck

Sunday 01 July 2007 8:47:11 am

Hi guys,

Have been playing with the feedback form class from ezwebin 1.2 and have had some trouble trying to get the submitter of the form cc'd on the email.

From what I have been able to determine I need to override the content/collectedinfomail/form.tpl file and add an append-block for the variable email_cc_receivers.

{if and(is_set($object.data_map.recipient), $object.data_map.recipient.has_content)}
{set-block scope=root variable=email_receiver}{$object.data_map.recipient.content}{/set-block}
{/if}
{append-block scope=root variable=email_cc_receivers}{$collection.attributes.5.data_text}{/append-block}

As per the code above I have added the append-block, but the required collection attribute is not working. I have tried the code

{append-block scope=root variable=email_cc_receivers}test@domain.com{/append-block}

and the email is sent to the cc as required. Can anyone provide guidance as to how to access the submitted variable from the form for the user's email address?

Thanks in advance.

Andrew Duck, Executive Director, Quiqcorp Limited
eZ Certified Developer and Trainer.
Member of the Community Project Board
http://quiqcorp.com | http://twitter.com/andrewduck

Heath

Thursday 05 July 2007 2:07:00 pm

Try using the global variable scope, this works well for us!

 {append-block scope=root variable=email_cc_receivers}{$#collection.attributes.5.data_text}{/append-block}

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Andrew Duck

Thursday 05 July 2007 2:09:05 pm

My fault :)

I hadn't checked... or didn't know how to check for the correct attribute id.

The correct code for the ezwebin 1.2 class would appear to be {$collection.attributes.3.data_text}

For anyone else who runs into this problem throw in a {$collection.attributes|attribute(show,3)} into your form.tpl and you will receive the output in the email that is sent.

Perhaps someone can mention a better way for accessing and finding out such information?

Andrew Duck, Executive Director, Quiqcorp Limited
eZ Certified Developer and Trainer.
Member of the Community Project Board
http://quiqcorp.com | http://twitter.com/andrewduck

kracker (the)

Thursday 05 July 2007 2:10:57 pm

No worries,

We all know these details are something you learn in practice and are not well documented or explained currently. Re: The difference between '$' and '$#',

http://ez.no/doc/ez_publish/technical_manual/3_9/reference/template_functions/variables/set#comment14289

<i>//kracker

Orbital : Hackers Soundtrack : Halcyon and On and On</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

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