For some reason, my form has a submit button and the form has an id tag to it. When i do a test to call the .submit function, the form just closes. Here is the example: http://overtheoceanfilms.com/admin/index.php (press the button in the "action" column)
The link to open the modal (i load the form from another page that gets loaded in the href tag.)
<a href="inc/editInquiry.inc.php?id=<?php echo $row['customer_id'];?>" data-reveal-id="modal_inquiry_editUser" data-reveal-ajax="true" id="<?php echo $row['customer_id'];?>"> <i class="fi-page-edit large"></i> </a>
Here is my modal:
<!--INQUIRY EDIT USER -->
<div id="modal_inquiry_editUser" class="reveal-modal" data-reveal aria-labelledby="modalTitle" aria-hidden="true" role="dialog">
<a class="close-reveal-modal" aria-label="Close">×</a>
</div>
Here is the jquery, very simple:
$('#inquiry_editUserForm').submit(function() {
alert('test');
});
PHP Form (editInquiry.inc.php)
<form id="inquiry_editUserForm" method="post" action="">
....stuff inside form
<button type="submit"> Update </button>
</form>