Checkbox group
Several boxes at once: any number of them may be ticked.
Settings:
| Setting | What it does |
|---|---|
| Options | A static list, or read from a model — as in Select |
| Columns | How many boxes fit across, 3 by default |
| Default | What is ticked in a new record |
The value holds every ticked option, so the template iterates:
html
<ul class="tags">
{foreach $features as $feature}
<li>{$feature}</li>
{/foreach}
</ul>To test for one option, use in:
html
{if 'delivery' in $features}
<p>We deliver</p>
{/if}Same job as a multiple Select, different shape
A checkbox group shows every option at once; a multi-select Select hides them behind a click. Short list — boxes; long list — dropdown.