{{ $type := .Get "type" }} {{ $name := .Get "name" }} {{ $has_other := (eq (.Get "add_other") "true") }} {{ $.Scratch.Set "form-input-type" $type }} {{- if not (in (slice "checkbox" "radio" "select") $type) -}} {{- errorf "Invalid multiple-choice input type \"%s\" - valid options are \"checkbox\", \"radio\", and \"select\"" -}} {{- end -}}
{{ if eq $type "select" }} {{ end }}
{{ if eq $type "select" }} {{ else }} {{ end }}
{{ if and (eq $type "select") $has_other }}
{{ end }}