I have a button with its id and I want to pass this id to the modal body.how can I pass it to the modal body?
button with id with var=q
<td><button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal2" id="${q.id}">Confirm</button>
modal content
<div class="modal fade" id="myModal2" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Send an Email</h4>
</div>
<div class="modal-body">
<g:form action="send">
<h4>Email to:</h4><g:textField name="email" placeholder="Enter email" value=""/><br>
<h4>Subject:</h4><g:textField name="subject" placeholder="Enter subject"/><br>
<h4>Description:</h4><g:textArea name="body" placeholder="Enter body"/><br>
<g:submitButton name="send" value="send"/>
</g:form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>