Forums / Setup & design / [Solved] ezselection displayed as radio buttons

[Solved] ezselection displayed as radio buttons

Author Message

Antoine Schmid

Thursday 09 March 2006 12:34:46 am

Hello,

In my form for creating a new user, I'd like to display a selection datatype with radio buttons.
But when my user is created, I can't find any of the values of this type. Here is an example of my code :

<input type="hidden" name="ContentObjectAttribute_id[]" value="{$content_attributes[0].id}" 

<input type="radio" value="0" checked="checked" id="wf_Individuel" name="ContentObjectAttribute_ezselect_selected_array_{$content_attributes[0].id}"/>
<label for="wf_Individuel" class="postField">Individuel</label>

<input type="radio" value="1" id="wf_Entreprise" name="ContentObjectAttribute_ezselect_selected_array_{$content_attributes[0].id}"/>
<label for="wf_Entreprise" class="postField">Entreprise</label>

<input type="radio" value="2" id="wf_Etudiant" name="ContentObjectAttribute_ezselect_selected_array_{$content_attributes[0].id}"/>
<label for="wf_Etudiant" class="postField">Etudiant</label>

Anyone can help me ?

I've a problem too with the dates : and it's quite the same ! I've tried to diplay the dates as selections and in this case too, nothing appears at the end of the creation...
Here is a part of my code:

<input type="hidden" name="ContentObjectAttribute_id[]" value="{$content_attributes[14].id}" />
<label for="wf_Datedefindescours3" id="wf_Datedefindescours3-L">Date:</label>
 <select id="wf_Datefindescour_jour3" name="ContentObjectAttribute_date_day_{$content_attributes[14].id}" class="required">
		<option value=""></option>
		<option value="01">01</option>
		<option value="02">02</option>
		<option value="03">03</option>
		.......
</select>/<select name="ContentObjectAttribute_date_month_{$content_attributes[14].id}" id="wf_Datefindescour_mois3">
		<option value=""></option>
		<option value="01">January</option>
		.......
</select>/<select name="ContentObjectAttribute_date_year_{$content_attributes[14].id}" id="wf_Datefindescour_annee3">
		<option value=""></option>
		<option value="2002">2002</option>
		<option value="2003">2003</option>
		.......
</select>

The same as before, nothing...
I would be glad to have some help.

Thanks

Antoine

Nabil Alimi

Thursday 09 March 2006 8:46:58 am

Hi Antoine,

Where is your $content_attributes variable defined ?

My blog : http://www.starnab.com/ezpublish / http://www.starnab.com/ / http://www.assiki-consulting.com
eZ Publish Freelance developper. Feel free to contact me +33 674 367 057
nabil at assiki d0t fr

Antoine Schmid

Friday 10 March 2006 1:34:27 am

Well...
That's a good question !

This code is inside an override of the user/register.tpl and the variable is accessible. But this is not the problem because it works with the other fields of the form (email, password, etc.)

In fact, it is as if the system was not able to read the content of the value="whatever" of the input.

Any idea ?

Antoine

Antoine Schmid

Wednesday 15 March 2006 5:08:51 am

The dates work ! I made a mistake.

But the radios buttons still don't work... As someone tried to do the same ?

Antoine Schmid

Wednesday 15 March 2006 5:19:46 am

IT WORKS !!!

"[]" was missing at the end of the name...

<input type="radio" value="1" id="privee1" name="ContentObjectAttribute_ezselect_selected_array_{$content_attributes[19].id}[]"/>

and not

<input type="radio" value="1" id="privee1" name="ContentObjectAttribute_ezselect_selected_array_{$content_attributes[19].id}"/>

Antoine