I have a modal called details , I have the following data in it:
<input type="text" class="form-control" id="id" name="id" required>
<input type="text" class="form-control" id="nome" name="nome" required>
That was filled in like this:
modal.find('.modal-body input[name="id"]').val(id)
modal.find('.modal-body input[name="nome"]').val(nome)
When I call the second modal alert by the button:
<button type="submit" data-toggle="modal" data-target="#alterar">Salvar</button>
How to pass the input's data (id and name) of modal details to the modal alert ?