Forums / Developer / CC Feedback Form to Submitter

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/

eZ debug

Timing: Jan 21 2025 15:58:58
Script start
Timing: Jan 21 2025 15:58:58
Module start 'content'
Timing: Jan 21 2025 15:58:58
Module end 'content'
Timing: Jan 21 2025 15:58:58
Script end

Main resources:

Total runtime0.2347 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0092 587.7109180.8359
Module start 'content' 0.00920.0133 768.546997.8984
Module end 'content' 0.02250.2122 866.4453526.7734
Script end 0.2347  1,393.2188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00401.6857200.0002
Check MTime0.00160.6848200.0001
Mysql Total
Database connection0.00090.372810.0009
Mysqli_queries0.165470.44721410.0012
Looping result0.00170.73401390.0000
Template Total0.211790.210.2117
Template load0.00100.432010.0010
Template processing0.210789.771510.2107
Override
Cache load0.00070.314010.0007
Sytem overhead
Fetch class attribute can translate value0.00070.309310.0007
XML
Image XML parsing0.00030.132510.0003
General
dbfile0.01586.7219200.0008
String conversion0.00000.003030.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs