<?php foreach (\Netzmacht\Contao\FormDesigner\Util\WidgetUtil::getOptions($this->widget) as $option): ?>
    <?php if ($option['type'] == 'group_start'): ?>
        <fieldset>
        <legend><?= $option['label'] ?></legend>
    <?php endif; ?>

    <?php if ($option['type'] == 'option'): ?>
        <div class="form-check">
            <input type="radio" name="<?= $option['name'] ?>" id="opt_<?= $option['id'] ?>"
                   class="radio form-check-input"
                   value="<?= $option['value'] ?>"<?= $option['checked'] ?><?= $option['attributes'] ?>>
            <label id="lbl_<?= $option['id'] ?>" for="opt_<?= $option['id'] ?>" class="form-check-label">
                <?= $option['label'] ?>
            </label>
        </div>
    <?php endif; ?>

    <?php if ($option['type'] == 'group_end'): ?>
        </fieldset>
    <?php endif; ?>
<?php endforeach; ?>
