Hi,
Does anyone have experience how to print radio/checkbox groups in the form templates. Specific im trying to give the checkboxes the CLASS of the GROUP that they belong to as set in the form generator.
Just a snipped out of the "form_checkbox.html5" template we made.
HTML Code:
<ul>
<?php foreach ($this->getOptions() as $option): ?>
<li CLASS="<<GROUP NAME HERE>>">
<span><input type="checkbox" name="<?= $option['name'] ?>" id="opt_<?= $option['id'] ?>" class="checkbox" value="<?= $option['value'] ?>"<?= $option['checked'] ?><?= $option['attributes'] ?>> <label id="lbl_<?= $option['id'] ?>" for="opt_<?= $option['id'] ?>"><?= $option['label'] ?></label></span>
</li>
<?php endforeach; ?>
</ul>
Bookmarks