template with select multiple, input custom attribute
This commit is contained in:
parent
530a1171e6
commit
e3748c853f
4 changed files with 13 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{{define "form_select"}}
|
||||
<div class="input-container">
|
||||
<label for="{{.ID}}" class="form-label">{{.Label}}</label>
|
||||
<select class="form-select" id="{{.ID}}" name="{{.ID}}">
|
||||
<select class="form-select" id="{{.ID}}" name="{{.ID}}"{{if eq .IsMultiple true}} multiple{{end}}>
|
||||
{{range $options := .AllOptions}}
|
||||
<option value="{{$options.Value}}" {{if eq $options.Value $.SelectedOption.Value }}selected="selected"{{end}}>{{$options.Caption}}</option>
|
||||
{{end}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue