Share » Forums » Setup & design » Attributes of feedback_form

Attributes of feedback_form

Attributes of feedback_form

Sunday 15 January 2006 10:39:09 am - 3 replies

Author Message

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

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu