Skip to content

[6.x] Only add the required attribute to checkboxes with a single option - #15760

Open
mynetx wants to merge 1 commit into
statamic:6.xfrom
mynetx:fix/checkboxes-required
Open

mynetx wants to merge 1 commit into
statamic:6.xfrom
mynetx:fix/checkboxes-required

Conversation

@mynetx

@mynetx mynetx commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Marking a Checkboxes field as required in a frontend form put the HTML required attribute on every checkbox, so the browser wouldn't submit the form until all options were ticked. The server only needs one.

This keeps required only when the field has a single option, like an "I agree" box, where the browser check still makes sense.

If you've published the form templates, apply the same change to your checkboxes template.

Fixes #11062

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

Form checkboxes with required

1 participant