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

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

eZ debug

Timing: Jan 30 2025 22:23:24
Script start
Timing: Jan 30 2025 22:23:24
Module start 'layout'
Timing: Jan 30 2025 22:23:24
Module start 'content'
Timing: Jan 30 2025 22:23:25
Module end 'content'
Timing: Jan 30 2025 22:23:25
Script end

Main resources:

Total runtime1.0981 sec
Peak memory usage8,192.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0039 588.1328151.2109
Module start 'layout' 0.00390.0036 739.3438220.6875
Module start 'content' 0.00751.0899 960.03134,460.2109
Module end 'content' 1.09740.0007 5,420.242215.8516
Script end 1.0981  5,436.0938 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.3062160.0002
Check MTime0.00130.1160160.0001
Mysql Total
Database connection0.00050.046710.0005
Mysqli_queries1.008591.8394600.0168
Looping result0.00060.0527580.0000
Template Total1.052695.820.5263
Template load0.00200.180120.0010
Template processing1.050695.668020.5253
Template load and register function0.00150.139710.0015
states
state_id_array0.00130.121610.0013
state_identifier_array0.00230.206820.0011
Override
Cache load0.00170.1588410.0000
Sytem overhead
Fetch class attribute can translate value0.00160.142820.0008
Fetch class attribute name0.00180.167450.0004
XML
Image XML parsing0.00230.207620.0011
class_abstraction
Instantiating content class attribute0.00000.001050.0000
General
dbfile0.00430.3930160.0003
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 21
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs