Hello,
I am facing an issue. When i am display a form using focus item in my website after form gets submit, the redirection is done in modal popup iteself and its not getting closed and then redirecting. Can anyone please help me resolve this.
Hello,
I am facing an issue. When i am display a form using focus item in my website after form gets submit, the redirection is done in modal popup iteself and its not getting closed and then redirecting. Can anyone please help me resolve this.
Found the solution to this. I am not sure if you consider this a hack, but this worked for me.
In mautic-form-src.js & mautic-form.js files there is a code that is missing to close the modal.
Find “// Register a callback for a redirect” in mautic-form-src.js
// Register a callback for a redirect
if (response.redirect) {
Modal.close(); <---- Line Added
setTimeout(function () {
window.location = response.redirect;
}, 2000);
}
} else if (response.redirect) {
Modal.close(); <---- Line Added
window.location = response.redirect;
Similarly find it also in mautic-form.js and added the following code
that didn’t solve for me. Do you have any other ideas? I have this problem and I can’t solve it. we are in 2020 and this bug remains active
the solution to this topic is simple. The modal does not close because the mautic-form.js file is not loaded.
To solve this problem, go to settings and change the path to the website that should look like this: https://yourmauticdomain.com/index.php
just remove the index.php just getting https://yourmauticdomain.com/
You could also update the related issue in Mautic with this helpful workaround: