Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 27, 2019 01:17
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 parzibyte/e6a62616eda5aa3a7d61998b567619d4 to your computer and use it in GitHub Desktop.
Save parzibyte/e6a62616eda5aa3a7d61998b567619d4 to your computer and use it in GitHub Desktop.
<form th:object="${producto}" th:action="@{/productos/agregar}" method="post">
<div class="form-group">
<label for="nombre">Nombre del producto</label>
<input th:field="*{nombre}" id="nombre" placeholder="Escribe el nombre del producto" type="text"
class="form-control">
</div>
<div class="form-group">
<label for="codigo">Código de barras</label>
<input th:field="*{codigo}" id="codigo" placeholder="Escribe el código del producto" type="text"
class="form-control">
</div>
<div class="form-group">
<label for="existencia">Existencia actual</label>
<input th:field="*{existencia}" id="existencia" placeholder="Cantidad actual del producto" type="number"
class="form-control">
</div>
<div class="form-group">
<label for="existencia">Precio</label>
<input th:field="*{precio}" id="precio" placeholder="Precio del producto" type="number"
class="form-control">
</div>
<button class="btn btn-success" type="submit">Guardar</button>
&nbsp;<a class="btn btn-warning" th:href="@{/productos/mostrar}">Ver todos</a>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment