Thursday 13 September 2007 12:26:58 am
I'm trying to pass variables to a form inside another document through the url. Here is a link:
<a href={concat("/some_url/","/(param1)/",$node.data_map.attr1.content,"/(param2)/",$node.data_map.attr2.class_content.options[$node.data_map.attr2.value[0]].name)|ezurl}><img class="buy" src={"images/content/desc/buy.gif"|ezdesign} alt="" /></a>
First variable compares with elements values and if it equal put the "selected" attribute to make the needed option selected. But it's now working (.
<SELECT name="(filter)" size="1">
{def $classAttribute=fetch( 'content', 'class_attribute', hash( 'attribute_id', 240 ) )}
{def $options=$classAttribute.content.options}
{foreach $options as $option}
<option value="{$option.id}" {if eq($view_parameters.param1, $option.name}selected{/if}>{$option.name|wash( xhtml )}</option>
{/foreach}
{undef $options}
{undef $classAttribute}
</SELECT>
Second variable come to input field value. I don't know how to put parameters in the {attribute_view_gui} so I just take the output code of the text field attribute at put the url variable insude the value="".
<input class="box" size="70" name="ContentObjectAttribute_ezstring_data_text_554" value="{$view_parameters.param2}" type="text">
The variable is displaying in the output html code, but is not visible on the rendered page. When I remove the "name="ContentObjectAttribute_ezstring_data_text_554" attribute the value is visible. Need your help, please!
|