go-examples/form-ex1/form.html
2017-07-27 19:57:26 +02:00

24 lines
501 B
HTML

<!DOCTYPE html>
<html>
<head><title>Form ex1</title></head>
<body>
{{ if .first }}
{{ if .last }}
<p>Hello {{ .first }} {{ .last }}</p>
{{ end }}
{{ end }}
<form method="POST">
<label>
First name:
<input type="text" name="first" value="{{ .first }}"/>
</label>
<label>
Last name:
<input type="text" name="last" value="{{ .last }}"/>
</label>
<input type="submit" value="Submit"/>
</form>
</body>
</html>