Skip to content

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

Merged
duncanmcclean merged 1 commit into
statamic:6.xfrom
mynetx:fix/checkboxes-required
Nov 2, 2026
Merged

duncanmcclean merged 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>
@duncanmcclean
duncanmcclean merged commit 45549cb into statamic:6.x Nov 2, 2026
62 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.

Form checkboxes with required

2 participants