I guess the problem is that when you submit the form, you send a POST request to the thank you - Flexion page - while when you open the url directly in the browser, it sends a GET request.
The <form> tag’s action should point to an endpoint where you handle the form data (in your case the name and the email).
Redirecting the user to the thank-you page should be a different and separated action, for example:
when the POST request succeeds, then navigate the user to the thank you page
I have continued to try and debug this error today. Still no luck, but I have been able to uncover something that might help point out the issue. When I view the network submission in Edge/chrome I am able to see a failed record, right before a successful POST.
when I select this record, I see the following details (note, this information is not available in firefox when view Network tab, with preserve log checked.
So really, functionality is perfect, I just need to stop the error occurring JUST before the post, and the thank-you screen should be displayed. I can see it from the NETWORK tab:
UPDATE: Tests have been done on windows 10.
This error does not occur in my iphone.
It does occur on os x Safari.
UPDATE 2: I have now found that the error is happening when javaScript is enabled. If disabled, functionality works as expected. When i went into the debugger, i found the following error in Firefox:
Glad it is working without JS. I will now try to get things working with JS, and this should give me progressive functionality, which is what I was after anyway, but, still does not explain the issue…
This is working as expected. Form is submitted, and I get a success message back.
I have added some vanilla JS to submit the form.
On my original site, flexion.tech, I have now deployed the exact same code base, however, I still get an error, however, the vanilla JS now catches it at least.
Even when I get the error, the form is still submitted.
Hey fool! no worries. Yes I reached out to the twitter community who pointed out there may be an issue with the serviceworker.js. I have added flexion.tech to EXCLUDED_URLS url… which seems to have fixed it for now.
Will update this ticket once I am 100% sure the issue is fixed. will be in the next 48 hours.
Happy that this has worked now. I have a report of a false positive on the form submission now, which is bothering me quite a bit. I have not been able to re-produce the issue…
My concern is it is the opposite to the false negative that I was getting in this issue.