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

form-check-inline support for .*-feedback #30439

Open
zalog opened this issue Mar 24, 2020 · 4 comments
Open

form-check-inline support for .*-feedback #30439

zalog opened this issue Mar 24, 2020 · 4 comments

Comments

@zalog
Copy link
Contributor

zalog commented Mar 24, 2020

This is what it looks like:

Screenshot 2020-03-21 at 21 05 06

This is the markup:

<div class="form-check form-check-inline">
  <input ... class="form-check-input is-invalid">
  <label>1</label>
  <div class="invalid-feedback">Example invalid feedback</div>
</div>
<div class="form-check form-check-inline">
  <input ... class="form-check-input">
  <label class="form-check-label">2</label>
</div>
<div class="form-check form-check-inline">
  <input ... class="form-check-input">
  <label class="form-check-label">3 (disabled)</label>
</div>

Perhaps we need to move *-feedback somewhere outside and under all .form-check-inline.

@ffoodd
Copy link
Member

ffoodd commented Mar 24, 2020

Do you have any real world use case for this?

I mean, in a fieldset containing a group of checkboxes (meaning options), I don't see how you could ever get an invalid value on a single checkbox. As a las resort, checking at least one option could be required, but it then should be carried by a containing fieldset, shouldn't it?

@patrickhlauke I'd love to have your thought about this case.

@zalog
Copy link
Contributor Author

zalog commented Mar 24, 2020

The real world example would be to move that message (help text, valid / invalid feedback) under all .form-check-inline.
Move it as per group, outside, as I wrote in the description :)
What do you think?

@mdo
Copy link
Member

mdo commented Mar 24, 2020

Wondering if this is fixed with @ysds's changes to form validation in #30170?

@mdo mdo added the css label Mar 24, 2020
@zalog
Copy link
Contributor Author

zalog commented Mar 25, 2020

Yep, I think it's fixed in a way.
With #30170, .*-feedback are not display: none by default anymore.
Perhaps it's not documented/exemplified. I can help with this if needed.

Great work @ysds :)

Screenshot 2020-03-25 at 08 17 05

@mdo mdo added the feature label Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants