Skip to content

[6.x] Add multiple option to form Dictionary fieldtype - #16132

Merged
duncanmcclean merged 1 commit into
6.xfrom
dictionary-multiple-option
Dec 1, 2026
Merged

duncanmcclean merged 1 commit into
6.xfrom
dictionary-multiple-option

Conversation

@duncanmcclean

Copy link
Copy Markdown
Member

This pull request adds a "Multiple" toggle to the Dictionary form fieldtype, like the one on the Dropdown fieldtype.

Previously, the Dictionary field only had a "Max Selections" setting. The underlying dictionary fieldtype treats anything other than max_items: 1 as a multi-select, so the only way to get a single select was to set Max Selections to 1.

When Multiple is off, this PR passes max_items: 1 to the underlying fieldtype, which makes the builder preview, the Antlers/Blade views, emails and charts treat the field as a single choice. Max Selections now only shows when Multiple is on.

Multiple defaults to true (unlike the Dropdown) so existing Dictionary fields keep behaving the same. Fields saved with max_items: 1 stay single.

Amp thread: https://ampcode.com/threads/T-f788b47a-e412-43ac-9a7a-988c14971d30

Fixes #16103

@duncanmcclean
duncanmcclean merged commit 3b72b02 into 6.x Dec 1, 2026
65 checks passed
@duncanmcclean
duncanmcclean deleted the dictionary-multiple-option branch December 1, 2026 10:13
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.

Forms 2.0: Dictionary is missing multiple option

2 participants