Skip to content

Instantly share code, notes, and snippets.

@fuchodeveloper
Created April 23, 2018 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fuchodeveloper/a040efa13aa59bf3f8ddb162e67df6f2 to your computer and use it in GitHub Desktop.
Save fuchodeveloper/a040efa13aa59bf3f8ddb162e67df6f2 to your computer and use it in GitHub Desktop.
Form to enter user details
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>Say hello in Spring</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<h1>Enter first and last names</h1>
<form action="#" th:action="@{/hello}" th:object="${hello}" method="post">
<p>First: <input type="text" th:field="*{firstName}" /></p>
<p>last: <input type="text" th:field="*{lastName}" /></p>
<p>
<input type="submit" value="Submit" />
<input type="reset" value="Reset" />
</p>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment