go-examples/form-ex1/form.html

24 lines
501 B
HTML
Raw Normal View History

2017-07-27 17:57:26 +00:00
<!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>