This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 4

Feature Suggestion (double submission prevention)


  1. rocketmedia
    Member

    After working with the most recent couple version of machform we have noticed a behavior in iframe embeds and page redirects.

    We have found if you have a page redirected after a form submission and hit the back button for any reason, you will duplicate the submission to the database and be redirected a second time to the thank you page. We are able to consistently duplicate this issue on several different sites and servers.

    While we understand that this is more a caching issue than a machform behavior.

    I suggest that since that behavior can't be prevented, that maybe you setup throttling of entries within a certain amount of time or even using the session id to mark the entry so that they don't register into the database. It appears this is the behavior used in other systems with a similar problems.

    Most of our duplicate entries come within 10-20 seconds of the original but most coming in within a second of the original submission.

    Posted 9 years ago #
  2. AMurray
    Pro Member

    Do you mean if you have a "thank you" page that is a HTML page rather than the built-in thanks page?

    I have set up a two-field form, a single line text and date field. I fill in the two fields, click submit, it goes to my custom Thank you (HTML file) page.

    In Firefox for my testing, if I click Back button, my browser tells me "Page Expired" (same with Google Chrome, or probably any browser will show a similar message). Usually there's either a "try again" button or it advises you to refresh/reload the page (using F5 key).

    Refreshing the page will reload the Machform and attempt to resubmit the entry, but with "no duplicates" turned on will presvent this and give you errors about data already existing.

    If you don't use the "no duplicates" the form will resubmit the entry without detecting it is an existing entry in the database. Alternatively, you could add a message to your "thanks" page such as "Do not press back button or you may cause the form to resubmit your entry"

    Use "No duplicates" option in the field properties e.g. on your email or phone field or some other unique information. I think the no duplicate works on text field and date field and possibly one or two others like email, number field type etc.

    Try my example here:
    https://www.murraywebs.net/mf/view.php?id=28802

    Posted 9 years ago #
  3. rocketmedia
    Member

    Thank you for the prompt response, the bigger issue isn't with the php embeds, those have always worked fine. We notice the issue when using the iframe / javascript embeds. I have attached an example to show the behavior

    http://cbowman.net/test.html

    Posted 9 years ago #
  4. AMurray
    Pro Member

    Even still the "No Duplicate" option shoudl prevent the double submission regardless of your embed method (?).

    Trying your form it goes back immediately to the form (with a cleared field - nothing in it), and so I resubmit and it will just do that in circles.

    Suggest try turning on the "no duplicates" for that test form, and you will see how it works as I described above.

    Also my example above, is not using any embed method, it is just the direct link to the form (if that makes any difference).

    Posted 9 years ago #

RSS feed for this topic

Reply