Skip to content

For anybody struggling with names on radio buttons and checkboxes #331

Closed

Description

@aptvaltechtest

Just set the id and it copies over to the name at render

Activity

  1. aptvaltechtest commented on Sep 28, 2022

    @aptvaltechtest
    Author

    { tag: 'input', config: { label: 'Checkbox Group', editorLabel: 'Checkbox Group', disabledAttrs: ['name'], lockedAttrs: ['name','required','className'], }, meta: { group: 'common', id: 'chkbox', icon: 'checkbox', }, options: [ {label: 'Option 1', value: 'opt1', selected: true} ], attrs: { id: '', className: '', type: 'checkbox', required: true, }, },

  2. kevinchappell commented on Nov 19, 2024

    @kevinchappell
    Collaborator

    the id name was originally implemented to prevent name collisions but i think we can remove this restriction and add a tooltip informing the form editor if an element already exists with the same name.

  3. kevinchappell commented on Sep 25, 2026

    @kevinchappell
    Collaborator

    This still applies in v5: radio and checkbox groups take their name from attrs.id (or the field id) and ignore a name attribute. It's the same root cause as #270 and #220, and the planned fix covers all three. Option inputs will use attrs.name when it's set, then attrs.id, then the field id, so the attrs.id workaround above keeps working. One heads-up for later: a group that already has a name saved will start submitting under that name instead of f-<id>.

  4. added a commit that references this issue on Sep 25, 2026
  5. kevinchappell commented on Sep 26, 2026

    @kevinchappell
    Collaborator

    🎉 This issue has been resolved in version 5.3.3 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions