Documentation Docs
Documentation Docs

Prevent Duplicate Form Submissions from the Same User

About Duplicate Form Submission

Duplicate form submission refers to the situation where the same form or survey is submitted multiple times by the same user. This can happen due to the user's fault (for instance, when the user mistakenly clicks the submit button multiple times) or due to technical issues or system errors. Duplicate form submissions can distort data analysis and inflate response metrics. Therefore, implementing measures to prevent multiple form submissions is essential for ensuring the accuracy and reliability of the data collected through these forms.

How Cookies Help Prevent Multiple Submissions

Cookies store information on a user's browser after the user have submitted a form or survey. This information indicates that the form has already been submitted from that particular browser. Subsequent attempts to submit the form can then be intercepted and blocked based on the presence of this cookie. This mechanism ensures that each user can only submit the form once from their specific browser, effectively preventing duplicate submissions without inconveniencing the user with additional verification steps.

To prevent repetitive form submission from the same respondent, follow these steps:

  1. In the top right corner of the Property Grid, select Survey to switch to the survey-level settings.
  2. Under General, locate an input field called Limit to one response.
  3. Enter a unique cookie value for your form.
Prevent duplicate form submissions in SurveyJS

Troubleshooting

To verify whether cookie-based duplicate submission prevention is functioning correctly and the assigned cookie is set in a user's browser, use the following instructions:

  1. Open a form that has an assigned cookie value.
  2. Submit your responses by clicking the Complete button at the end of the form.
  3. Open the developer tools by pressing F12 or right-clicking anywhere on the form and selecting Inspect.
  4. In the toolbar of the developer tools, select Application.
  5. In the Storage section on the left panel, locate the Cookies subsection.
  6. Expand the Cookies subsection by clicking the arrow icon.
  7. Find and select the website where your form has been published.
  8. In the list of cookies on the right panel, locate the unique cookie value that you've assigned.
Troubleshooting cookie-based duplicate submission prevention in SurveyJS

Limitations

Using cookies to prevent duplicate form submissions has its limitations. Since cookies are stored on the user's device, users can easily delete them from their browser settings or disable cookies altogether, which would allow them to bypass the prevention mechanism. Additionally, if a user switches to a different device or browser, the cookie tracking method won't work either, potentially allowing multiple submissions from the same user.

The most reliable way to stop users from submitting the same form multiple times is to implement a server-side validation and tracking mechanism that authenticates a user before they proceed to the form. This approach ensures that the validation and tracking occur on the server side, making it more difficult for users to bypass the prevention mechanism compared to client-side methods like cookies.

Send feedback to the SurveyJS team

Need help? Visit our support page

Copyright © 2024 Devsoft Baltic OÜ. All rights reserved.

Your cookie settings

We use cookies on our site to make your browsing experience more convenient and personal. In some cases, they are essential to making the site work properly. By clicking "Accept All", you consent to the use of all cookies in accordance with our Terms of Use & Privacy Statement. However, you may visit "Cookie settings" to provide a controlled consent.

Your renewal subscription expires soon.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.

Your renewal subscription has expired.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.