Skip to content

feat(forms): pass SubmitEvent to FormSubmitOptions.action#68198

Open
volkanfilazi wants to merge 2 commits intoangular:mainfrom
volkanfilazi:feat/forms-submit-event
Open

feat(forms): pass SubmitEvent to FormSubmitOptions.action#68198
volkanfilazi wants to merge 2 commits intoangular:mainfrom
volkanfilazi:feat/forms-submit-event

Conversation

@volkanfilazi
Copy link
Copy Markdown

@volkanfilazi volkanfilazi commented Apr 14, 2026

Allow submit action callbacks to access the SubmitEvent that triggered the form submission.

This enables identifying the submitter button via event.submitter.

Closes #67334

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.dev application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

The submit action defined in FormSubmitOptions does not have access
to the SubmitEvent that triggered the form submission.

This makes it impossible to determine which submit button triggered
the form when multiple submit buttons are present.

Issue Number: #67334

What is the new behavior?

The submit action now receives the SubmitEvent as a third argument.

This allows accessing event.submitter to identify which button
triggered the form submission.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@google-cla
Copy link
Copy Markdown

google-cla bot commented Apr 14, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@pullapprove pullapprove bot requested a review from devversion April 14, 2026 11:30
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: forms labels Apr 14, 2026
@ngbot ngbot bot added this to the Backlog milestone Apr 14, 2026
@volkanfilazi volkanfilazi force-pushed the feat/forms-submit-event branch from 784b66f to 4e9ff94 Compare April 14, 2026 11:32
@JeanMeche JeanMeche requested a review from leonsenft April 14, 2026 11:45
@volkanfilazi volkanfilazi force-pushed the feat/forms-submit-event branch from 459c2ec to f77cd6a Compare April 14, 2026 13:42
feat(forms): pass SubmitEvent to FormSubmitOptions.action

Allow submit action callbacks to access the SubmitEvent that triggered
the form submission.

This enables identifying the submitter button via event.submitter.

Closes angular#67334

fixed test fails and added missing event changes

goldens form signal index api has been updated
@volkanfilazi volkanfilazi force-pushed the feat/forms-submit-event branch from f77cd6a to 4569dc9 Compare April 14, 2026 14:10
@google-cla google-cla bot added cla: yes and removed cla: no labels Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add the submit event to the arguments of FormSubmitOptions.action

2 participants