Skip to content

feat: Add required selections and exclusive options to forms - #34

Merged
FXschwartz merged 2 commits into
serverpod:mainfrom
FXschwartz:FXschwartz/form-required-and-exclusive-options
Oct 2, 2026
Merged

FXschwartz merged 2 commits into
serverpod:mainfrom
FXschwartz:FXschwartz/form-required-and-exclusive-options

Conversation

@FXschwartz

@FXschwartz FXschwartz commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Adds two form rules needed for serverpod/serverpod#5788, where serverpod create shows the IDE/agent screen first and must not let the user continue until they have selected something. The rules live in the form itself, so every way of advancing (Enter, Space on a focused Next, mouse click) is covered.

  • FormSelectionConfig.selectionRequired: a multi-screen form will not move past the config until at least one option is selected.
  • FormSelectionConfig.exclusiveOptions: multi-select options that can not be combined with any other option, such as "None".
  • MultiScreenFormState.canAdvance exposes whether the current screen can be left, and the Next/Submit button is disabled while it can not.
  • Bumps the version to 0.13.0.

Breaking: implementers of FormSelectionConfig must add exclusiveOptions and selectionRequired.

image

@FXschwartz FXschwartz self-assigned this Oct 2, 2026

@marcelomendoncasoares marcelomendoncasoares left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@FXschwartz
FXschwartz merged commit ba422ff into serverpod:main Oct 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants