Radio and checkbox fields

To display element lists of radio or checkbox controls, the syntax provided for wrapping the elements uses a <div class="choix"></div>. This formatting makes it possible to have buttons display before the labels, or to provide a horizontal radio list (using CSS statements).

<li class="editer_syndication">
	<div class="choix">
		<input type='radio' class="radio" name='syndication' value='non' id='syndication_non'[ (#ENV{syndication}|=={non}|oui)checked="checked"] />
		<label for='syndication_non'><:bouton_radio_non_syndication:></label>
	<div class="choix">
		<input type='radio' class="radio" name='syndication' value='oui' id='syndication_oui'[ (#ENV{syndication}|=={oui}|oui)checked="checked"] />
		<label for='syndication_oui'><:bouton_radio_syndication:></label>

To make the list display in horizontal mode using CSS, just make the "choix" divs display as inline:

.formulaire_spip .editer_syndication .choix {display:inline;}

Author Mark Baber Published : Updated : 12/03/23

Translations : English, Español, français