Forums / Developer / problem with e-mail valdiation
Jose Mourinho
Friday 14 September 2007 1:15:08 pm
Hello all
I try to display an email attribute witch is information collector with this templte. The contact_email attribute is from class email. The problem is that when i input an email adress in the field the systems aways say that the ares is invalid. If a use a standart template wit {attribute_view_gui attribute=$node.data_map.contact_email } it work properly. What culd be the reason for this problem?
{def $attribute=$node.data_map.contact_email $data_text=cond( is_set( $#collection_attributes[$attribute.id] ), $#collection_attributes[$attribute.id].data_text, $attribute.content )} <span class="element"> <label for="{$attribute.contentclass_attribute_identifier}">{'Email'}{if $attribute.is_required} <em>({'required'})</em>{/if}:</label><br class="labelbreak" /> <input type="text" size="40" name="{$attribute_base}_data_text_{$attribute.id}" value="{$data_text|wash( xhtml )}" tabindex="2" /> <input type="hidden" name="ContentObjectAttribute_id[]" value="{$attribute.id}" /> </span>{undef $attribute $data_text}
10x all
Ćukasz Serwatka
Sunday 16 September 2007 11:21:56 pm
Use visualisation template function for it:
attribute_view_gui or attribute_edit_gui (depends on needs)
Both are template based and it is much easier and cleaner way of doing this.
http://ez.no/doc/ez_publish/technical_manual/3_9/reference/template_functions/visualization/attribute_view_guihttp://ez.no/doc/ez_publish/technical_manual/3_9/reference/template_functions/visualization/attribute_edit_gui
Personal website -> http://serwatka.net Blog (about eZ Publish) -> http://serwatka.net/blog