Skip to content

Conversation

@Nayte91
Copy link
Contributor

@Nayte91 Nayte91 commented Nov 30, 2025

Q A
Branch? 8.1
Bug fix? no
New feature? yes
Deprecations? no
Issues Fix #62500
License MIT

Summary

NavigatorFlowType is a must-have in a Formflow, as it brings you a bunch of welcomed buttons, like 'previous', 'next' or 'finish'. The FormFlow feature also includes a very convenient ResetFlowType that you add separately in your form builder.

Now, NavigatorFlowType also bundles the ResetFlowType: by adding the 'with_reset' option, you will also display the reset button, saving you a few lines of code and a few headaches.

Technically, this follows the same pattern used by TimeType (with_minutes, with_seconds) and DateIntervalType (with_years, with_months, etc.) for conditional child fields.

Usage

// Without reset (default behavior)
$builder->add('navigator', NavigatorFlowType::class);

// With reset button
$builder->add('navigator', NavigatorFlowType::class, [
    'with_reset' => true,
]);

@Nayte91 Nayte91 force-pushed the feature/form-navigator-with-reset-option branch from 99e972f to ea9bf63 Compare November 30, 2025 20:56
@OskarStark
Copy link
Contributor

OskarStark commented Dec 1, 2025

Please add a line to the changelog, thanks

@Nayte91 Nayte91 force-pushed the feature/form-navigator-with-reset-option branch from ea9bf63 to ff67ba0 Compare December 1, 2025 09:43
@Nayte91
Copy link
Contributor Author

Nayte91 commented Dec 1, 2025

Please add a line to the changelog, thanks

Done!

@Nayte91 Nayte91 force-pushed the feature/form-navigator-with-reset-option branch from ff67ba0 to cacaec1 Compare December 1, 2025 13:16
@OskarStark OskarStark changed the title [Form] Add reset button in NavigatorFlowType [Form] Add reset button in NavigatorFlowType Dec 3, 2025
ResetFlowType is now conditionally rendered when displaying NavigatorFlowType.

- Added an option 'with_reset'
- option is false by default to respect BC
- added Test class,
- modified previous tests that rendered NavigatorFlowType and ResetFlowType
@Nayte91 Nayte91 force-pushed the feature/form-navigator-with-reset-option branch from cacaec1 to 4613ccf Compare December 7, 2025 20:11
@yceruto
Copy link
Member

yceruto commented Dec 8, 2025

Thank you @Nayte91.

@yceruto yceruto merged commit 1ca3e5d into symfony:8.1 Dec 8, 2025
9 of 10 checks passed
@Nayte91 Nayte91 deleted the feature/form-navigator-with-reset-option branch December 8, 2025 12:43
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.

[Forms] Formflow 1st experiment

5 participants