cms icon indicating copy to clipboard operation
cms copied to clipboard

[5.x] Allow options without labels in the Button Group & Select fieldtypes

Open duncanmcclean opened this issue 8 months ago • 0 comments

This pull request fixes an issue where it wasn't possible to add options without labels in the Button Group & Select fieldtypes, even though the UI indicated it should have been possible.

This worked fine previously. However, in #9834, we changed how we handle validating Array fields so it forces both keys and values to be set.

This change was an oversight, since there are cases, like this one, where you want the value to be optional

This PR removes the "force values" validation from the Array fieldtype, removes the duplicated "force keys" validation from the Button Group & Select option fields (since the Array field does that for us now) and adds tests to ensure options can be configured without labels.

Fixes #10323.

duncanmcclean avatar Jun 19 '24 16:06 duncanmcclean