Coding with SPIP 3.0
SPIP3.0 Technical Documentation

> > > > Radio and checkbox fields

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).

  1. <li class="editer_syndication">
  2. <div class="choix">
  3. <input type='radio' class="radio" name='syndication' value='non' id='syndication_non'[ (#ENV{syndication}|=={non}|oui)checked="checked"] />
  4. <label for='syndication_non'><:bouton_radio_non_syndication:></label>
  5. </div>
  6. <div class="choix">
  7. <input type='radio' class="radio" name='syndication' value='oui' id='syndication_oui'[ (#ENV{syndication}|=={oui}|oui)checked="checked"] />
  8. <label for='syndication_oui'><:bouton_radio_syndication:></label>
  9. </div>
  10. </li>

Download

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

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