Coding with SPIP 2.1
SPIP 2.1 Technical Documentation

> > > > Field separation using fieldset

Field separation using fieldset

When a form contains a large number of fields, they are generally broken up into various blocks, each known as a fieldset in HTML.

Such blocks of fields are sequenced into ul/li type lists:

  1. [...]
  2. <form method="post" action="#ENV{action}"><div>
  3. #ACTION_FORMULAIRE{#ENV{action}}
  4. <ul>
  5. <li class="fieldset">
  6. <fieldset>
  7. <h3 class="legend">Section A</h3>
  8. <ul>
  9. <li> ... </li>
  10. <li> ... </li>
  11. ...
  12. </ul>
  13. </fieldset>
  14. </li>
  15. <li class="fieldset">
  16. <fieldset>
  17. <h3 class="legend">Section B</h3>
  18. <ul>
  19. <li> ... </li>
  20. <li> ... </li>
  21. ...
  22. </ul>
  23. </fieldset>
  24. </li>
  25. </ul>
  26. <p class="boutons"><input type="submit" class="submit" value="<:pass_ok:>" /></p>
  27. </div></form>

Download

This example shows that you can have embedded lists, with the first <li> having the CSS class of "fieldset". Instead of providing HTML <legend> tags, a different format is provided using <h3 class="legend">, which offers a lot more opportunity for CSS tag styling.