Is it possible to show an success overlay message after submitting the form?

Hello Team,

I’ve created a form and success page without problem on the link below:

https://jesusrmz.com/phptest/contact.html

I have a customer that will use Netlify Forms and they’re requesting an overlay message as a success message, instead of jumping to another page.

Is this possible?

Thanks!

hey there,

sorry to be slow to reply. Can you clarify a bit what you mean by overlay message? do you mean a modal?

maybe relevant:

Hey I saw my post was linked so I’ll try and sum up what I did to get around this.

It this article https://docs.netlify.com/forms/setup/#success-messages it says you can redirect to a custom page on form submit. I simply redirected to a page called “success” and had a meta refresh tag that redirected again to a hashed url.

<meta http-equiv="refresh" content="0;URL='hire#success'" />    

Then in javascript, on the page that I needed the content on, I used this:

<script type="text/javascript">
// Get URL
var url = window.location.href;
// Get DIV
var msg = document.getElementById('success');
// Check if URL contains the keyword
if( url.search( 'success' ) > 0 ) {
  // Display the message
  msg.style.display = "block";
}
</script>

This script basically looks for #success in the url and if it finds it changes the style of an element.
In your case you wanted a modal or an overlay so this can easily be done by adding the modal ID into this script.

Hope this works for you!