<?php $id = uniqid(); ?>

<label for="<?= $id ?>"><?= e($field->name) ?> <?= $field->unit ? sprintf('(%s)', e($field->unit)) : '' ?></label>
<?php
if (isset($widget)):
    echo $widget->render();
else:
?>
<input type="<?= $type ?>"
       name="<?= e($this->fieldPrefix()) ?>[<?= e($field->id) ?>]" class="form-control" id="<?= $id ?>"
       value="<?= e($value->value) ?>"
>
<?php endif;?>
