Descripción
Create a Thymeleaf form for creating a new entity
File Template: ✅
Prefix
thyme:create
Scopes
html
Snippet de código
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>Create ${1:MyEntity}</title>
</head>
<body>
<h1>Create ${1:MyEntity}</h1>
<form th:action="@{'/${2:entidades}'}" th:object="${item}" method="post">
<label for="name">Name:</label>
<input type="text" id="name" th:field="*{name}" />
<!-- Add other attributes here -->
<button type="submit">Save</button>
</form>
<a th:href="@{'/${2:entidades}'}">Cancel</a>
</body>
</html>