Hi All
I hope I have put this in the correct section.
I am new to Bootstrap etc and need some help getting form data out of a Bootstrap Modal and into a variable so that I can use that information in my PHP code.
Below is my Modal code… I reused the delete confirmation modal however cannot work how to get the email address out of the Modal into a variable.
I am 99.9% sure that it is just a matter of adding a little bit of code to the script at the bottom however I have not been able to work out what needs adding.
Can you help?
Any help would be great.
Thanks
mrmbarnes
<!-- EMAIL MODAL -->
<div class="modal fade" id="emailConfirm" tabindex="-1" role="dialog" aria-labelledby="emailConfirmLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title main-heading-colour" id="emailConfirmLabel">EMAIL CONFIRMATION</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button>
</div>
<div class="modal-body">
<label for="exampleInputEmail1">Email invoice to...</label>
<div class="form-group">
<input type="email" class="form-control" id="" name="" aria-describedby="invoiceEmailAddress" placeholder="Enter Invoice Email Address" value="<?php print $invoiceEmailAddress; ?>">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary w-50" data-dismiss="modal">CLOSE</button>
<a href="admin.php?action=manageInvoice&nav=accounts&invoiceID=<?php print $invoiceID; ?>&uniqueID=<?php print $uniqueID; ?>&internalAction=emailInvoice&uniqueID=<?php print $invoiceRow['uniqueID']; ?>" id="email" class="btn btn-success w-50">EMAIL NOW</a> </div>
</div>
</div>
</div>
<script>
$( document ).on( "click", "email", function() {
$('#emailConfirm').modal('hide');
});
</script>