aboutsummaryrefslogtreecommitdiff
path: root/templates/forms/datalist_input.php
blob: 7958c332875ee1d8cb667ea00135c4790d14f7e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<div class="formpart">
    <label <?= $this->required ? 'class="studiprequired"' : '' ?> for="<?= $id ?>">
        <span class="textlabel">
            <?= htmlReady($this->title) ?>
        </span>
        <? if ($this->required) : ?>
            <span class="asterisk" title="<?= _('Dies ist ein Pflichtfeld') ?>" aria-hidden="true">*</span>
        <? endif ?>

        <input type="text" list="<?= $this->title ?>" id="" v-model="<?= htmlReady($this->name) ?>" <?= $this->required ? 'required aria-required="true"' : '' ?> />

        <datalist class="" id="<?= $this->title ?>" <?= $attributes ?>>
            <? foreach ($options as $key => $option) : ?>
                <option value="<?= htmlReady($option) ?>"<?= ($option == $value ? " selected" : "") ?>>
                </option>
            <? endforeach ?>
        </datalist>
    </label>

</div>