Forums / Setup & design / Problem with Variables in override for /content/collectedinfomail/form.tpl

Problem with Variables in override for /content/collectedinfomail/form.tpl

Author Message

Patti McCreary

Thursday 29 January 2004 1:36:01 pm

I've created a simple support form that mails to email_receiver. I want the Subject on the email to be determined by one of the form attributes. With the following code, the subject is filled with the correct attribute, but the rest of the attributes do not show up in the body of the email:

# code 1
{"The following INFORMATION was collected:"|i18n("design/standard/content/edit")}
{section name=Attribute loop=$collection.attributes}
{section name=problem show=$Attribute:item.contentclass_attribute_identifier|eq('concern')}
{set-block scope=root variable=subject}Subject: {attribute_result_gui view=info attribute=$Attribute:item}{/set-block}
{section-else}
{$Attribute:item.contentclass_attribute_name}:
{attribute_result_gui view=info attribute=$Attribute:item}
{/section}
{/section}
#

If I switch it to the following code, the subject is not filled, but the attributes do show up:
# code 2
{"The following INFORMATION was collected:"|i18n("design/standard/content/edit")}
{section name=Attribute loop=$collection.attributes}
{section name=problem show=$Attribute:item.contentclass_attribute_identifier|ne('concern')}
{$Attribute:item.contentclass_attribute_name}:
{attribute_result_gui view=info attribute=$Attribute:item}
{section-else}
{set-block scope=root variable=subject}Subject: {attribute_result_gui view=info attribute=$Attribute:item}{/set-block}

{/section}
{/section}

#

Of course, I need the subject and all the attributes to show in the email. I think I'm just using the variables incorrectly but not sure what I need to change.

Thanks very much in advance,
Patti McCreary