Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bob 15 posts 64 karma points
    Jun 18, 2015 @ 16:16
    Bob
    0

    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

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Jun 18, 2015 @ 16:18
    Ismail Mayat
    0

    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

    Jun 19, 2015 @ 07:53

    If possible could you share an example project with your setup, since I've tried to reproduce but can't at the moment..

  • Bob 15 posts 64 karma points
    Jun 19, 2015 @ 13:51
    Bob
    0

    Thanks for your fast response.

    There aren't any js errors and I've removed the event subscriber:

    FormRenderController.FormValidate += FormRenderController_FormValidate;
    

    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,}$.

  • Simon Dingley 1470 posts 3427 karma points c-trib
    Dec 08, 2015 @ 13:25
    Simon Dingley
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft