<?php
/**
 * @var $key string
 * @var $field string
 * @var $args string
 */
?>
<label for="<?= $key ?>"><?= $field['label'] ?? "" ?></label>
<select name="<?= $key ?>" id="<?= $key ?>" class="bp-form-control <?= $args['class'] ?? "" ?> <?= (isset($field['required']) && $field['required']) ? "required" : "" ?>">
    <?php if (!empty($field['options'])) { ?>
        <option value=""><?= __("Select", "auctionforge") ?></option>
        <?php foreach ($field['options'] as $name => $option) { ?>
            <option value="<?= $name ?>"><?= $option ?></option>
        <?php } ?>
    <?php } ?>
</select>
<span id="error-<?= $key ?>" class="bp-form-error <?= apply_filters('bp_hidden_class', 'hidden') ?>"><?= (isset($field['required']) && $field['required']) ? $field['notice'] : ""
    ?></span>