Problem/Motivation

It should be possible to submit a form using the GET method twice, fe. by using target _blank.
For sure the "Prevent duplicate submissions" flag needs to be unchecked too!
Setting the form to GET via the webform UI, results in a lowercase method name 'get', which then is not respected by Drupal.behaviors.formSingleSubmit.

Proposed resolution

Use the patch from #3024953: Drupal.behaviors.formSingleSubmit method name should be case-insensitive.

The selector in Drupal.behaviors.webformRemoveFormSingleSubmit can just skip the

:not([method~="GET"])

part to catch-up the proposed core change (also already in advance).

API change

Fixed typo: Renamed Drupal.behaviors.weformRemoveFormSingleSubmit to Drupal.behaviors.webformRemoveFormSingleSubmit.

Comments

ytsurk created an issue. See original summary.

ytsurk’s picture

Title: Normalize form method (uppercase) - multiple GET submissions not possilbe » Drupal.behaviors.formSingleSubmit method name should be case-insensitive - multiple GET submissions not possilbe
Issue summary: View changes
Status: Needs work » Needs review
Issue tags: +JavaScript
StatusFileSize
new431 bytes
ytsurk’s picture

StatusFileSize
new722 bytes

Here with the typo fixed too.

ytsurk’s picture

ytsurk’s picture

Category: Bug report » Task

  • jrockowitz committed ef74711 on 8.x-5.x authored by ytsurk
    Issue #3024957 by ytsurk: Drupal.behaviors.formSingleSubmit method name...
jrockowitz’s picture

Status: Needs review » Fixed

Thanks for the patch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.