| 
                                                             Thursday 17 March 2005 4:29:13 am 
                                                            
                                                                
                                                                 
Hi! I have a question regardning the validation of a form.  I want to validate information from checkboxes and radiobuttons. The user must fill in one alternative before sending the form as an email. For example: in my class I have a field called customer_type, this is a text field attribute, but (as I read here in the forum) when I show the form on my site I've used:         
{let myattribute=$node.data_map.customer_type}
{section name=Radio loop=array('Företagskund','Privatkund')}
<td><b>{$:item}</b><input type="radio" name="ContentObjectAttribute_ezstring_data_text_{$myattribute.id}" value="{$:item}" /></td>
{/section}
{/let}
    The problem is that the radiobuttons can be left unchecked. The validation doesn't include my radiobuttons or checkboxes (I've used the same trick for showing checkboxes).  I know that the best thing would have been to create a new datatype that can collect information and is required. No such datatype exists, what I can see (I use version 3.5.0). The enum-attribute can not be set to collect information, and if I change the php-file for the enum-attribute and let it collect information, it still doesn't show radiobuttons with:         {attribute_view_gui attribute=$node.data_map.customer_type}
    So my question is: How can I change the collectedinfo_validation.tpl to include my new radiobuttons/checkboxes?  
Thanks in advance! /Anja                                                             
                                                                                                                            ------------------------------------ 
Anja Lundin 
Developer, Novitell AB  
Sweden 
 
www.novitell.se
                                                                 
                                                                                                                     |