# Remain at form doesn't work after form submission

**URL:** <https://forum.mautic.org/t/remain-at-form-doesnt-work-after-form-submission/26603>\
**Category:** Product Support\
**Tags:** mautic-4\
**Created:** [January 5, 2023, 8:08am UTC](https://forum.mautic.org/t/remain-at-form-doesnt-work-after-form-submission/26603 "2023-01-05T08:08:20Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ooralas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ooralas/32/7060_2.png) [@ooralas](https://forum.mautic.org/u/ooralas)\
**Post date:** [January 5, 2023, 8:08am UTC](https://forum.mautic.org/t/remain-at-form-doesnt-work-after-form-submission/26603/1 "2023-01-05T08:08:20Z")

</div>

**Your software**  
My Mautic version is: 4.4.5  
My PHP version is: 7.4.29  
My Database type and version is: 10.6.7-MariaDB-1:10.6.7+maria~bionic

**Your problem**  
My problem is:  
I have integrated the Mautic script on an external website, because I use a Mautic form, which I display on my website to the users. In the form details, I set it so that the user should stay in the form after the submission.

I currently encounter the problem that the user is redirected to the host website. Previously I was on version 4.3.1, where everything worked correctly. Since I upgraded to 4.4.5, the “Successful Submit Action: Remain at Form” has stopped working.

Does anyone have an idea where the problem can be ? or at least how I can block the forwarding e.g.: by JavaScript ?

---

<div class="post-metadata">

**Author:** ![robm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/robm/32/260_2.png) [@robm](https://forum.mautic.org/u/robm)\
**Post date:** [January 5, 2023, 12:19pm UTC](https://forum.mautic.org/t/remain-at-form-doesnt-work-after-form-submission/26603/2 "2023-01-05T12:19:10Z")

</div>

How did you insert the form, via HTML or java script?

If HTML, insert fresh HTML after making sure the setting is def set to remain at form.

---

<div class="post-metadata">

**Author:** ![ooralas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ooralas/32/7060_2.png) [@ooralas](https://forum.mautic.org/u/ooralas)\
**Post date:** [January 5, 2023, 1:12pm UTC](https://forum.mautic.org/t/remain-at-form-doesnt-work-after-form-submission/26603/3 "2023-01-05T13:12:18Z")

</div>

no actually i inserted the form via Javascript. Is there any way to solve the problem with javascript form ?

by the way: how to integrate mautic form via html ? may you have a link to the documentation page?

---

<div class="post-metadata">

**Author:** ![robm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/robm/32/260_2.png) [@robm](https://forum.mautic.org/u/robm)\
**Post date:** [January 5, 2023, 3:32pm UTC](https://forum.mautic.org/t/remain-at-form-doesnt-work-after-form-submission/26603/4 "2023-01-05T15:32:52Z")

</div>

> **[Managing forms | Mautic](https://docs.mautic.org/en/components/forms/managing-forms)**
>
> . The new form view lets you create a form and attach any fields you want to collect from your users. After you've created the fields you can then define what actions you want to perform after the user submits the information.Form Overview. The form...

---

<div class="post-metadata">

**Author:** ![ooralas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ooralas/32/7060_2.png) [@ooralas](https://forum.mautic.org/u/ooralas)\
**Post date:** [January 5, 2023, 3:44pm UTC](https://forum.mautic.org/t/remain-at-form-doesnt-work-after-form-submission/26603/5 "2023-01-05T15:44:38Z")

</div>

thanks. Any idea to solve the problem with javascript generated from ?

---

<div class="post-metadata">

**Author:** ![ooralas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ooralas/32/7060_2.png) [@ooralas](https://forum.mautic.org/u/ooralas)\
**Post date:** [January 11, 2023, 2:12pm UTC](https://forum.mautic.org/t/remain-at-form-doesnt-work-after-form-submission/26603/6 "2023-01-11T14:12:17Z")

</div>

i inserted the form via HTML, the page still redirects

---

<div class="post-metadata">

**Author:** ![leoschuler](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/leoschuler/32/4798_2.png) [@leoschuler](https://forum.mautic.org/u/leoschuler)\
**Post date:** [January 11, 2023, 7:19pm UTC](https://forum.mautic.org/t/remain-at-form-doesnt-work-after-form-submission/26603/7 "2023-01-11T19:19:30Z")

</div>

I wish I could help, but I use mautic 3 right now, perhaps if you share your page I can take a look at the form and try to debug/understand why the redirect is occurring and if it is in fact a mautic bug

---

<div class="post-metadata">

**Author:** ![ooralas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ooralas/32/7060_2.png) [@ooralas](https://forum.mautic.org/u/ooralas)\
**Post date:** [January 12, 2023, 8:09am UTC](https://forum.mautic.org/t/remain-at-form-doesnt-work-after-form-submission/26603/8 "2023-01-12T08:09:57Z")

</div>

thanks for your reply.

Actually the site is for the company where I work. The site is unfortunately not yet live so I can not create a review for it .

---

<div class="post-metadata">

**Author:** ![ooralas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ooralas/32/7060_2.png) [@ooralas](https://forum.mautic.org/u/ooralas)\
**Post date:** [January 19, 2023, 1:15pm UTC](https://forum.mautic.org/t/remain-at-form-doesnt-work-after-form-submission/26603/9 "2023-01-19T13:15:52Z")

</div>

So I have solved the problem.  
For others who will encounter the problem to know how to solve it, I will write the solution here.  
John Linhart(@john in Mautic-Slack Workspace) suggested to run the following command:  
`bin/console mautic:assets:generate` since there was an error on the JS console that MauticSDK was missing. After we executed the command, it (Remain at form) worked again.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)\
**Post date:** [January 21, 2023, 1:16am UTC](https://forum.mautic.org/t/remain-at-form-doesnt-work-after-form-submission/26603/10 "2023-01-21T01:16:29Z")

</div>

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
