Skip Navigation

It is possible to submit a form several times by clicking several times on the Submit button

Resolved

Reported for: Toolset Forms 2.0

Resolved in: 2.4

Symptoms

When using a Toolset front-end form for submitting posts, users or relationships, and that form does not use AJAX submission, then the form can be submitted several times.

This happens when clicking the submit button very fast, several times. As a consequence, multiple instances of the post are created.

Workaround

There are currently two workarounds for this issue:

1. Use the AJAX option for submitting the form.

Or

2. Add the following code snippet to the form’s JS Editor:

Prevent multiple form submissions
jQuery(document).ready(function($){
    $('form.cred-form').on('submit', function(e){
        if ($('form.cred-form').valid()) {
          $('input.wpt-form-submit').hide().after('<span>Sending...</span>');
        }
    });
});

Comments are closed