• Resolved Knut Sparhell

    (@knutsp)


    To create such, a very common simple, single choice construct, I have to:

    1. Create a paragraph with the main or common label
    2. Create all the inputs, type radio, blocks with the same name, just different labels
    3. Group the above blocks, so they can be kept togehter. Works fine, but cumbersome and error prone in case the name is misspelled, since the default is generated from the label.

    I suggest a separate radio block, like select, with editable options (label and value pairs).

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Matthias Kittsteiner

    (@kittmedia)

    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

    Thread Starter Knut Sparhell

    (@knutsp)

    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.

    Plugin Author Matthias Kittsteiner

    (@kittmedia)

    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.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.