Skip to content

fix(forms): allow FormRoot to be used without submission options#67727

Open
leonsenft wants to merge 2 commits intoangular:mainfrom
leonsenft:sf-form-root-submit
Open

fix(forms): allow FormRoot to be used without submission options#67727
leonsenft wants to merge 2 commits intoangular:mainfrom
leonsenft:sf-form-root-submit

Conversation

@leonsenft
Copy link
Contributor

The [formRoot] directive will no longer call submit() if the bound form doesn't define its own submission options. This allows the directive to be used solely for the default behavior it provides: setting novalidate on the <form> and calling preventDefault() on the submit event.

Fix #67367

@leonsenft leonsenft requested a review from kirjs March 17, 2026 20:15
@leonsenft leonsenft added area: forms target: minor This PR is targeted for the next minor release forms: signals labels Mar 17, 2026
@ngbot ngbot bot modified the milestone: Backlog Mar 17, 2026
- **FormField**:  `form_field_directive.ts` -> `form_field.ts`
- **FormRoot**:   `ng_signal_form.ts`       -> `form_root.ts`
The `[formRoot]` directive will no longer call `submit()` if the bound
form doesn't define its own submission options. This allows the
directive to be used solely for the default behavior it provides:
setting `novalidate` on the `<form>` and calling `preventDefault()` on
the `submit` event.

Fix angular#67367
@leonsenft leonsenft force-pushed the sf-form-root-submit branch from e4ff0e2 to bff5cb5 Compare March 17, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: forms forms: signals target: minor This PR is targeted for the next minor release

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

submit() + FormRoot throws NG01915 runtime error

1 participant