Skip to content

Recreate FormData after beforeSubmit mutates form#24946

Merged
maliming merged 1 commit intorel-10.2from
jquery-form-extensions.js
Feb 25, 2026
Merged

Recreate FormData after beforeSubmit mutates form#24946
maliming merged 1 commit intorel-10.2from
jquery-form-extensions.js

Conversation

@maliming
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings February 25, 2026 09:42
@maliming maliming requested a review from EngincanV February 25, 2026 09:44
@maliming maliming added this to the 10.2-final milestone Feb 25, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug where form mutations made by the beforeSubmit callback were not reflected in the submitted data. The issue occurred because FormData and the serialized array were created before calling beforeSubmit, so any DOM changes made by the callback (such as adding hidden fields) were not captured.

Changes:

  • Move FormData creation to after beforeSubmit callback execution
  • Re-serialize form array after beforeSubmit to capture DOM mutations for GET requests

@maliming maliming requested a review from skoc10 February 25, 2026 09:55
@maliming maliming merged commit 6abf294 into rel-10.2 Feb 25, 2026
6 checks passed
@maliming maliming deleted the jquery-form-extensions.js branch February 25, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants