Stop site from reloading after form submit if form in modal or show/hide section

Hi everyone,

I have a form on my site in a show/hide section in my footer, the problem is when the form is submitted, the page reloads and the user has to show the section to see if it worked, but the success message doesn’t show.

Is there any easy way to fix this, perhaps enabling AJAX or some other method? Assume the same would happen if the form was in a modal too.

Appreciate any ideas and assistance (non-technical).

Thank you