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.