Posting a form within in modal that doesn't close the modal and replaces form with thank you message

9 0 1

Here is my page:

If you click the "Book Your Free Consultation" button, a modal appears.
It's a simple javascript / css modal.

However I have the action empty (I've tried the URL as well) but it closes the modal and goes to a 404 page.

Upon submit, I want two things to happen:

1. Keep the Modal open

2. Replace the form with a thank you message.

I've looked everywhere for help on this, but can't find anything.
Any help would be most appreciated.