- {{ if .Label }}<label class="form-label" for="{{ .Name }}">{{ .Label }}</label>{{ end }}
- <input type="{{ .Type }}" id="{{ .Name }}" name="{{ .Name }}"
- {{- if .Class }} class="{{ .Class }}"{{ end }}
- {{- if and .Value (ne .Type "password") }} value="{{ .Value }}"{{ end }}
- {{- if .Placeholder}} placeholder="{{ .Placeholder }}"{{ end }}
- {{- if .Help }} aria-describedby="{{ .Name }}Help"{{ end }}
- {{- if .Required }} required{{ end }}
- {{- if .AutoFocus }} autofocus{{ end }}>
- {{ if .Help }}<div id="{{ .Name }}Help" class="form-text">{{ .Help }}</div>{{ end }}
- {{ if .Error }}{{ range $e := .Error }}<div class="text-danger">{{ $e }}</div>{{ end }}{{ end }}
|