Hello community!!!
I have a problem with passing values from a form to Thymeleaf using Spring Boot. I have a table with pizzas, and I am trying to pass the selected quantity and size values when adding a pizza to the cart. However, when submitting the form, instead of the expected pizzaId (id) value, the pizzaId (id, id, id, id, id, id) field inserts a comma separated list of values.
Below I have attached screenshots of my structure in HTML and the controller method in Spring Boot
I'm guessing the problem may be related to how I'm using the Thymeleaf loop to display the pizzas, and the fact that I have a form inside the body of the table.
Any help or hints on how to fix this problem would be appreciated. Thanks!!!