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!