Multi-step webform on ajax enable with radio/checkboxes is submitting twice

Created on 23 November 2023, over 1 year ago
Updated 7 April 2024, about 1 year ago

Problem/Motivation
We have a use case, multi-step webform with "Ajax" enabled in form settings and data layer push is happening in every step . We observed that whenever we have Radio/checkboxes(entity & normal) fields in the next step, the current step shows dual submission which can be seen in the console.log from JS. Due to which the data layer push is happening twice for the current step on a single submission.
This pattern is observed is when Checkbox/Radio button field is added to the form.

Steps to reproduce
Create a multi-step webform with "Ajax" enabled in form settings.
Add text field in step 1 & step 2
Add Radios/Checkboxes type field in step 3
Add any other field in step 4
Create a JS file with only Console.log keeping some dummy content
From the hook_alterForm attach the created JS file
While submitting the form step2(text field just before the radio buttons), could see that submission happening twice in the console.log, Which is leading to duplicate data layer submission in the GTM

🐛 Bug report
Status

Closed: outdated

Version

6.2

Component

Code

Created by

🇮🇳India ashetkar

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ashetkar
  • 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦

    Bug reports are always against the dev version.

  • Status changed to Postponed: needs info over 1 year ago
  • 🇺🇸United States jrockowitz Brooklyn, NY

    Please provide an example webform with 'no custom' code that replicates the issue using the bare minimum amount of elements.

  • Status changed to Closed: outdated about 1 year ago
  • 🇺🇸United States jrockowitz Brooklyn, NY

    There are other issue discussing duplicate submissions. Please post comments there.

Production build 0.71.5 2024