new.gohtml 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. {{ define "new.html" }}
  2. {{ block "content" . }}
  3. <form action="/contacts/new" method="post">
  4. <fieldset>
  5. <legend>Contact Values</legend>
  6. <p>
  7. <label for="email">Email</label>
  8. <input name="email" id="email" type="email" placeholder="Email" value="{{ .Email }}">
  9. <span class="error">{{ .Errors.email }}</span>
  10. </p>
  11. <p>
  12. <label for="first_name">First Name</label>
  13. <input name="first_name" id="first_name" type="text" placeholder="First Name" value="{{ .First }}">
  14. <span class="error">{{ .Errors.First }}</span>
  15. </p>
  16. <p>
  17. <label for="last_name">Last Name</label>
  18. <input name="last_name" id="last_name" type="text" placeholder="Last Name" value="{{ .Last }}">
  19. <span class="error">{{ .Errors.Last }}</span>
  20. </p>
  21. <p>
  22. <label for="phone">Phone</label>
  23. <input name="phone" id="phone" type="text" placeholder="Phone" value="{{ .Phone }}">
  24. <span class="error">{{ .Errors.Phone }}</span>
  25. </p>
  26. <button>Save</button>
  27. </fieldset>
  28. </form>
  29. <p>
  30. <a href="/contacts">Back</a>
  31. </p>
  32. {{ end }}
  33. {{ end }}