checkbox

An article by Gaspard Bucher

Display a set of checkboxes/radio buttons to create links.

  1. action
  2. ajax
  3. API
  4. classes
  5. common attributes
  6. conditions
  7. context
  8. dates
  9. display
  10. forms
    1. captcha
    2. checkbox
    3. form
    4. input
    5. new
    6. radio
    7. select
    8. textarea
  11. i18n
  12. meta
  13. SQLiss
  14. urls

Display a set of checkboxes/radio buttons to create links.

  • label (true, false, t, dyn str) prefix with a label field.
  • role relation involved
  • nodes can be “1,2,7” or “images”
  • in set the scope of the values when using a relation
  • ... see unknown for all options
  • values literal values separated by commas
  • show values to display (optional)
  • tshow translate values to display (either one by one or the complete list)
see label, radio, toggle
<r:checkbox role='blog' nodes='1'/>

<r:checkbox role='icon' nodes='images' in='project'/>

If the target relation is unique (has one), like for “icon”, this method displays radio buttons. Otherwise, checkboxes are displayed.

radio is an alias for “checkbox”.

literal values

You can also use the checkbox with literal values:

<r:checkbox values='1,10,15' show='new, processing, ready' name='status'/>

If you use translations, you can use tshow:

<r:checkbox values='1,10,15' tshow='status_list' name='status'/>