Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multiple radio buttons warning to docs #111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/guide/inputs/types/box/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,17 @@ The syntax for radio inputs is identical to checkboxes.

<demo-input-radio />


:::warning Multiple radio buttons with the same name
Radio buttons with the same name are considered one group in a `<form>`.
If you are using radio inputs in repeatable blocks the name will be the same,
and users will notice, that the current block input will "steal" the selection from the other.

Possible mitigations:
- append the current index to the name of the input
- wrap the input group to a `<form>` tag where you supress the `submit` event and handle handle possible problems with embedded forms
:::

## Styling box inputs

Checkboxes and radio boxes are notoriously frustrating to style. To assist,
Expand Down