March 2019
Intermediate to advanced
336 pages
9h 9m
English
The Create template consists of Header, Menu, and Footer templates. The form to create customer fields is found in the create template. This form is submitted to a web path—/insert, as shown in the following code snippet (Create.tmpl):
{{ define "Create" }} {{ template "Header" }} {{ template "Menu" }} <br> <h1>Create Customer</h1> <br> <br> <form method="post" action="/insert"> Customer Name: <input type="text" name="customername" placeholder="customername" autofocus/> <br> <br> SSN: <input type="text" name="ssn" placeholder="ssn"/> <br> <br> <input type="submit" value="Create Customer"/> </form>{{ template "Footer" }}{{ end }}
Read now
Unlock full access