Duplicate xform posts

Vote:
 

Hi,

A client is reporting issues with duplicate xform posts (they are using "the old XForms").
The form allows anonymous posts, and the same user is allowed to post the form several times. 

I reproduced the issue locally with clicking multiple times on the sumbit button, I was able to post the same message 3 times before the thank you page was visible.

Any suggestions on how I can stop this from happening?

The form is rendered using the Episerver Html.PropertyFor() method.

#178727
May 19, 2017 9:40
Vote:
 

Using javascript would be my choice.

#179089
May 31, 2017 8:03
Vote:
 

Yes, I would also use JavaScript for this. Something like this:

$(".xform").submit(function () {
    if ($(this).valid()) {
        $(this).submit(function () {
            return false;
        });
        return true;
    }
    else {
        return false;
    }
});
#179206
Jun 03, 2017 2:20
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.