Menu icon Foundation
Reveal Modal Close after Form Submit

I have a form within the reveal modal, when I click submit I would like the modal to close. I've tried a few things but can't get it working.

I've tried adding the dismissmodalclass to my submit button. I've also tried to add some jquery code to close on submit.

$('#reveal-modal').submit('reveal', 'close');             

         

revealmodaljquery

I have a form within the reveal modal, when I click submit I would like the modal to close. I've tried a few things but can't get it working.

I've tried adding the dismissmodalclass to my submit button. I've also tried to add some jquery code to close on submit.

$('#reveal-modal').submit('reveal', 'close');