Hi @knutsp,
did you already find the “Fieldset” block? It’s exactly for such purposes and works well with radio buttons.
While I understand your request in general, I try to not create additional blocks for very specific cases. Maybe a block pattern would work better in this case. What do you think?
Best regards,
Matthias
Ah, found it now. Thanks. Had a feeling I had missed something.
That seems to be a simple container with a legend, describing the set. Thats better, I can remove the paragraph above.
But ideally, it could be a variant of a group, if such is possible. A group may be transformed to different layouts, like a row. So I now group my input fields inside the fieldset, transform it to a row to fit my layout preference. And still have to ensure the input names are exactly the same.
The problem with the name is that not necessarily all inputs within a fieldset should have the same name. Maybe there’s a need of something like a “radio button container” as well as a “checkbox container”. However, at this point, you need to know that in your case identical names are required as well as such containers exist. A block variation by itself cannot introduce different types of blocks. It’s different to block transformations here.
I’ll keep this in mind, but at the moment, I don’t like the idea to introduce another (custom) transformation besides the block transformations and block styles that already exist. But I’ll monitor it if there is a need for it.