Wednesday 16 April 2003 12:07:17 am
Im having difficult using radio buttons from within forms and mapping them to attributes. I have a form that will email comments and information from a user to me. Standard information collector stuff. Most of the form elements I am rendering using code such as: {attribute_edit_gui attribute=$node.data_map.message}
The trouble comes when using radio buttons. There isnt a datatype for radio buttons - the closest seems to be either checkbox or enum... so using a function like attribute_edit_gui isnt possible. A workaround was to create an attribute, find the value in the database corresponding to that attribute and put this into the name value for the list of radio buttons, eg: <input type="radio" name="ContentObjectAttribute_ezstring_data_text_908" value="Accounts">Accounts <input type="radio" name="ContentObjectAttribute_ezstring_data_text_908" value="Sales">Sales But there must be an easier way to do this. What is the best way to handle radio buttons from within forms? Thanks Paul
|