ds4/src/templates/dialogs/simple-select-form.hbs

20 lines
858 B
Handlebars
Raw Normal View History

{{!--
!-- Render a simple form with a single select element. It uses the default form classes of Foundry VTT.
!-- @param identifier: The identifier to use as id for the select element. Can be used to query the value later on.
!-- @param label: Text to display as the label for the select element.
!-- @param options: Key-value pairs that describe the options. The keys are used for the value attribute of the
options, the values are used as content.
--}}
<form class="ds4-simple-form">
<div class="form-group">
<label for="{{identifier}}">{{label}}</label>
<div class="form-fields">
<select name="{{identifier}}" id="{{identifier}}">
{{#each options as | value key |}}
<option value="{{key}}">{{value}}</option>
{{/each}}
</select>
</div>
</div>
</form>