blob: 7debe1f3189932a0bbd9bb58d001198d39ace096 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org" th:replace="~{layout/main :: layout(title='Contact Us', content=~{::main})}">
<body>
<main>
<form th:action="@{/contact}" th:object="${contactForm}" method="post">
<div class="form-field-container">
<label>Name</label>
<input type="text" th:field="*{name}" placeholder="Your name" />
<div class="validation-error" th:if="${#fields.hasErrors('name')}" th:errors="*{name}"></div>
</div>
<div class="form-field-container">
<label>Email</label>
<input type="email" th:field="*{email}" placeholder="Your email" />
<div class="validation-error" th:if="${#fields.hasErrors('email')}" th:errors="*{email}"></div>
</div>
<div class="form-field-container">
<label>Message</label>
<textarea th:field="*{message}" placeholder="Your message"></textarea>
<div class="validation-error" th:if="${#fields.hasErrors('message')}" th:errors="*{message}"></div>
</div>
<button type="submit">Send</button>
</form>
</main>
</body>
</html>
|