Thursday 17 July 2008 8:03:57 am
Hi Michael,
I wonder how your solution could possibly work, if you have more than one occurrence of a data type? I think a better solution is to have a look at the collect templates which attribute_view_gui uses in forms and learn from the html there. If
{attribute_view_gui attribute=$node.object.data_map.your_attribute size='30'}
produces the correct input field for an attribute, the following code works to implement a default value :
<input class="box" type="text" size="30" name="ContentObjectAttribute_ezstring_data_text_{$node.object.data_map.your_attribute.id}" value="{$my_default_value}" />
Thereby it is also possible to pass the default value to a hidden field off course:
<input type="hidden" name="ContentObjectAttribute_ezstring_data_text_{$node.object.data_map.your_attribute.id}" value="{$my_default_value}" />
This worked perfectly for me and it should be easy to transfer this solution to other datatypes.
---------------------------------------
http://www.lbm-services.de
|