Forums / Setup & design / Attributes of feedback_form

Attributes of feedback_form

Author Message

Pascal France

Sunday 15 January 2006 10:39:09 am

Hi,

I've added the "Option'' attribute in the feedback_form classe and now I would like to send by mail the value of this attribute.

I read this post:
http://ez.no/community/forum/setup_design/how_to_output_specific_fields_from_a_form_in_an_e_mail

and follwed the instructions. In the mail, I've now a lot of informations about attributes, but I can't find anything about the new attribute.

The new attribute has:

Name: Option
Identifier: annee

and is a checklist with the 4 first months of the year.

Regards,

Pascal.

PS: In this case, I have to use <i>loop=$collection.attributes</i>, but what do I have to use when it's not attributes ?

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Pascal France

Sunday 15 January 2006 4:07:56 pm

Hi,

Of course, if I don't check Information Collector.... it can't work

But now, I realy don't understant the syntaxe of the <i>collectedinfomail/feedback_form.tpl</i> template.
I read this page:

http://ez.no/doc/ez_publish/technical_manual/3_6/reference/template_fetch_functions

but I don't succeeded to collect the "Option" attribute value (value which is dispalyed by <i>collectedinfo/form.tpl</i> after sending the form).

The value I want to fetch is:

<tr><td>>contentclassattribute_id</td>
<td>string</td>
<td>291</td>
</tr>
<tr><td>>attribute_original_id</td>
<td>string</td>
<td>0</td>
</tr>
<tr><td>>sort_key_int</td>
<td>string</td>
<td>0</td>
</tr>
<tr><td>>sort_key_string</td>
<td>string</td>
<td>''</td>
</tr>
<tr><td>>data_type_string</td>
<td>string</td>
<td>'ezoption'</td>
</tr>
<tr><td>>data_text</td>
<td>string</td>
<td>'<?xml version="1.0" encoding="UTF-8"?>
<ezoption>
 <name>Activités</name>
 <options>
   <option id="0"
           additional_price="">10</option>
   <option id="1"
           additional_price="">20</option>
   <option id="2"
           additional_price="">30</option>
 </options>
</ezoption>'</td>

one of the 3 options (10, 20 or 30).

Is there someone who can show/explain me the good syntaxe ?

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Esteban Rodriguez

Monday 16 January 2006 5:03:39 am

Hi Pascal,

I had to do something similar in a feedback form, and found how to fetch the values from the option attributes digging in the standard and admin templates.

Here's what I ended up using:

{section name=Attribute loop=$collection.attributes} {*LOOP THROUGH THE COLLECTED ATTRIB.*}
	{section show=$Attribute:item.contentobject_attribute.content.option_list} {*IS OPTION?*}
               {$Attribute:item.contentclass_attribute_name|wash}: {attribute_result_gui view=info attribute=$Attribute:item} {*THIS FETCHES THE SELECTED VALUE IN THE OPTION DATATYPE*} 
	{section-else} {*ALL OTHER ATTRIB WHICH ARE NOT OPTION*}
               {$Attribute:item.contentclass_attribute_name|wash}: {$Attribute:item.data_text|wash} 
	{/section}
{/section}

Also, check this page to see about the "attribute_result_gui" function.

Hope it helps

Esteban

I have great faith in fools; self-confidence my friends call it.

http://presencia.net

Pascal France

Monday 16 January 2006 6:21:47 am

Great !

It'i exactly what I was looking for.

Regards

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

eZ debug

Timing: Jan 31 2025 00:19:20
Script start
Timing: Jan 31 2025 00:19:20
Module start 'content'
Timing: Jan 31 2025 00:19:20
Module end 'content'
Timing: Jan 31 2025 00:19:20
Script end

Main resources:

Total runtime0.1806 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0078 587.9297370.2969
Module start 'content' 0.00780.0115 958.22661,005.6406
Module end 'content' 0.01930.1612 1,963.86723,894.4375
Script end 0.1805  5,858.3047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00432.3778200.0002
Check MTime0.00140.7493200.0001
Mysql Total
Database connection0.00070.367210.0007
Mysqli_queries0.095352.76861410.0007
Looping result0.00120.68961390.0000
Template Total0.160789.010.1607
Template load0.00090.480210.0009
Template processing0.159988.531010.1599
Override
Cache load0.00060.340510.0006
Sytem overhead
Fetch class attribute can translate value0.00150.823510.0015
XML
Image XML parsing0.00020.108510.0002
General
dbfile0.00784.3260200.0004
String conversion0.00000.003330.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.0002 secs