formwork/admin/views/fields/checkbox.php
2018-10-09 23:20:03 +02:00

7 lines
431 B
PHP
Executable File

<div>
<label class="checkbox-label">
<input type="checkbox" class="custom-checkbox" id="<?= $field->name() ?>" name="<?= $field->name() ?>"<?php if ($field->value() == true): ?> checked<?php endif; ?><?php if ($field->get('required')): ?> required<?php endif; ?><?php if ($field->get('disabled')): ?> disabled<?php endif; ?>>
<span class="custom-checkbox-text"><?= $field->label() ?></span>
</label>
</div>