I've made a Contour form and am handling the submit button click event in an Umbraco Event handler. Sometimes, this works correctly and when I click 'submit', the code handles some validation, creates a new member if required and responds with a validation failure or allows the Contour workflow to continue.
Other times, the form posts back without doing anything on clicking 'submit' the first time. The form then always behaves correctly on the second click of 'submit'. The issue is intermittent.
Please could anyone advise how I might be able to fix this? I'm using Contour version 3.0.27 and Umbraco version 7.2.5 assembly: 1.0.5610.18894.
The only thing running now is the content of the form as created via CMS. In spite of this, the issue is still occurring, and affecting all 5 forms on the site.
The simplest form has default stylesheet disabled and a short message on submit. The workflow for this form is simple, only sending a notification to a constant email address on form submit.
The form has 4 mandatory but non-validated text fields, apart from email, which uses the default Regex of ^\w[^@\s]*@[^@\s]{2,}$.
I have inherited a site with the same problem. The first time the form appears to submit but returns the page in the same state and doesn't run the workflow, the second time it completes with the expected result and returns the submit message. No errors show and no errors in the console.
Form submit button needs clicking twice
Hi,
I've made a Contour form and am handling the submit button click event in an Umbraco Event handler. Sometimes, this works correctly and when I click 'submit', the code handles some validation, creates a new member if required and responds with a validation failure or allows the Contour workflow to continue.
Other times, the form posts back without doing anything on clicking 'submit' the first time. The form then always behaves correctly on the second click of 'submit'. The issue is intermittent.
Please could anyone advise how I might be able to fix this? I'm using Contour version 3.0.27 and Umbraco version 7.2.5 assembly: 1.0.5610.18894.
Thanks,
Bob
Bob,
Can you open chrome inspector then try the submit and see if you are getting any javascript errors.
Regards
Ismail
Comment author was deleted
If possible could you share an example project with your setup, since I've tried to reproduce but can't at the moment..
Thanks for your fast response.
There aren't any js errors and I've removed the event subscriber:
In an attempt to isolate the issue.
The only thing running now is the content of the form as created via CMS. In spite of this, the issue is still occurring, and affecting all 5 forms on the site.
The simplest form has default stylesheet disabled and a short message on submit. The workflow for this form is simple, only sending a notification to a constant email address on form submit.
The form has 4 mandatory but non-validated text fields, apart from email, which uses the default Regex of ^\w[^@\s]*@[^@\s]{2,}$.
Did you resolve this?
I have inherited a site with the same problem. The first time the form appears to submit but returns the page in the same state and doesn't run the workflow, the second time it completes with the expected result and returns the submit message. No errors show and no errors in the console.
Contour v3.0.28 / Umbraco v7.2.1
is working on a reply...