Wagtail, tailwind css - javascript form load on page but submit not working

We have a new website being developed using Wagtail CMS with tailwind css.

The form javascript is placed on page and load fine. But when submitted, it does not show up in db and the page refreshes itself which it was suppose to redirect to a different URL.

The form script works fine on other website but not on this new one. Mautic tracking is on the page but we notice it seems not to be tracking in db or we can’t find any record of activities from that page.

What would be the way to search in Mautic to see if it tracking that page for sure?

Mautic tracking seems to be working. … I created a segment visit X and it’s showing all those who visited the page with the form insert but the form is still not entering the information into Mautic DB or redirect to another page after input.

Still need help with this one …

Here the link to form

http://agwm-31244.botics.co/en/contact-us/

Feel free to use fake email address but put in “test” in comment box … It supposed to redirect you to the main page if form submission is successful which it does not or the form is recorded in db.

The form load on page using javascript without a problem but submission is not working.

I would first ensure that you are always using https to load the page (force redirect) and also loading assets from https.

This is a development server … It will not been moved to a production server until this issue is fixed. We have ssl enabled on the development server and it made no difference.

I noticed in the log someone was able to send a test form … was it you? Can you tell us what the issue may be or whoever managed to submit that test form?

Thank you

This is not a Mautic form. How are you sending the results to Mautic?

It has submitted but it did not land to the page you expected. SSL is enabled but you do not always use it. Sometimes you load from https and sometimes you do not, which might be causing some issues.

We are going to go ahead move it to the actual production server and see if it solve the issue and we will make sure it’s force ssl all time.

It’s a mautic form loaded using the automatic Javascript

<script type="text/javascript" src="//www.domainhere.com/form/generate.js?id=xxx"></script>

Did you check your CORS settings in Mautic / on your Webserver and allow the domain, where the form is embedded?

Thank you for your reply however this post was made about 7 months ago and I was able to resolve this issue at that time.

What happened is that I asked the web developer to create a spot on the web page linking to the backend CMS admin input form box so I could just paste the Javascript inside it that is linked to the spot or make any changes without having to edit the page itself if you get what I mean.

The developer knew it was going to be a spot for the form from Mautic so he went ahead and inserted a form html tag around the spot on the web page thinking it needed it.

This cause the form to have to have double form tags and double closing tags. When I saw it during my inspection, I told developer to take his form html tags out. When he took it out, then everything start working as intended.

I never asked the developer to add those tags in there but I was glad to have spotted it during my html inspection cause I was ready to go bald!

2 Likes

Great!

Thanks for adding the resolution. Thats why I asked, as it seemed not to got a final response. Its always good for others to learn and solve similar issues. :v:

1 Like

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