I’m trying to create a form with an unknown number of links for example. Initially, there’s 1 input for the link with a button to add another input and again and again.
HTML view
<div class="mb-3">
<label for="image1" class="form-label">Image</label>
<input type="text" class="form-control" id="image1" placeholder="url" th:field="*{urls}" name="image1" />
<button id="btn"></button>
</div>
I can easily create other input with Jquery and HTML. But how the value will be send to my controller ?
For now, I did create a specify class to store the urls in List<String> instead of List<Image>.
Is it possible to store directly in images[x].url ?