You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
660 B
31 lines
660 B
<script>
|
|
const resetForm = () => {
|
|
$id('survey-form').reset();
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
#question-list {
|
|
font-size: 1.1em;
|
|
grid-template-columns: 1fr 60px;
|
|
gap: 10px;
|
|
}
|
|
</style>
|
|
|
|
<h1>{{ .Survey.Title }}</h1>
|
|
|
|
<p>{{ .Survey.Description }}</p>
|
|
|
|
<form id="survey-form" action="/survey/submit">
|
|
<grid id="question-list">
|
|
{{ range .Survey.Questions }}
|
|
<label for="question-{{ .Id }}">{{ .Question }}</label>
|
|
<input id="question-{{ .Id }}" type="checkbox" />
|
|
{{ end }}
|
|
</grid>
|
|
|
|
<button-group>
|
|
<button type="button" onClick="resetForm()">Reset</button>
|
|
<button type="submit">Submit</button>
|
|
</button-group>
|
|
</form>
|
|
|