22 lines
472 B
HTML
22 lines
472 B
HTML
{{ define "answers" }}
|
|
{{ range .Q.Answers }}
|
|
<div>
|
|
<input type="radio" name="answer" id="answer-{{ .ID }}" value="{{ .ID }}" />
|
|
<label for="answer-{{ .ID }}">{{ .Text }}</label>
|
|
</div>
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
{{ define "content" }}
|
|
<h2>Frage {{ .I }}</h2>
|
|
<p>{{ .Q.Text }}</p>
|
|
|
|
<form>
|
|
{{ template "answers" . }}
|
|
|
|
<button type="submit" hx-post="/display-question-{{ .ID }}-{{ .J }}/" hx-target="#content" hx-swap="innerHTML">
|
|
Weiter
|
|
</button>
|
|
</form>
|
|
{{ end }}
|