Skip to content

Multiple clicks on submission button results in duplicate records created #1117

Open
@Cpinhey

Description

Describe the bug
This bug is impacting a live UKHSA service that is using UKHSA implementation of webform capability for the user interface to capture information from users.

When a webform is submitted we expect to land on the Success Page to Confirm to the User that record has been created, however, in some scenarios after repeatedly hitting the submit button, the duplicate records get created and user is taken to Landing Page instead of success page

To Reproduce

  • Navigate to "Care OBRA Risk Assessment" webform
  • Start a new journey
  • Complete the user journey populating all sections until user gets to Check Your Answers Page (screenshot of CYA page attached)
  • Double Click/Continuously click the submit button with the mouse several times (screenshot attached of submit button)
  • Duplicate records are created in database [Salesforce] after repeatedly hitting the submit button

Expected behaviour
Only one record to be created regardless how many times Submit button is pressed

Screenshots
Please see attached screenshots:
Check Answers screen with submit button:
submit button
Salesforce evidence of duplicated records as result of clicking submit button repeatedly
dupes on sf

Repository
All envs where UKHSA Webforms is enabled
DelQA: https://runner-test.devwebforms.test-and-trace.nhs.uk/ReportAnOutbreak/acute-respiratory-infections-ari---covid-19-flu-or-unknown-infection-in-adult-social-care-settings
PreProd: https://runner-stg.testwebforms.test-and-trace.nhs.uk/ReportAnOutbreak/acute-respiratory-infections-ari---covid-19-flu-or-unknown-infection-in-adult-social-care-settings
Production: https://forms.ukhsa.gov.uk/ReportAnOutbreak/acute-respiratory-infections-ari---covid-19-flu-or-unknown-infection-in-adult-social-care-settings

Devices:
Tested on:
Windows 10 Pro Laptop
macOS Ventura 13.5.1
iPhone (Safari browser)

Browsers:
Confirmed Browsers:
Chrome Version: 116.0.5845.111 (Windows)
Google Chrome: Version 116.0.5845.110 (Mac)
Edge 114.0.1823.51
Safari Version 16.6 (18615.3.12.11.2) Safari (On Mac)

Additional context
This is a high priority item to resolve as it is impacting a live UKHSA service. Current workaround in place is to delete duplicate records however, this is not a sustainable solution and is impacting of business stakeholders confidence and satisfaction with the service.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions