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

check_box ignores help #316

Closed
lastobelus opened this issue Feb 16, 2017 · 3 comments
Closed

check_box ignores help #316

lastobelus opened this issue Feb 16, 2017 · 3 comments

Comments

@lastobelus
Copy link

<%= f.check_box :stuff, help: "Provides stuff" %>

does not render the help text.

@mattbrictson
Copy link
Contributor

Yes, this is a bit tricky due to how check boxes are rendered by Bootstrap. To display help and error message for a check box you need to wrap it in a form_group, like this:

<%= f.form_group :stuff do %>
  <%= f.check_box :stuff, help: "Provides stuff" %>
<% end %>

This is already documented in the README, here: https://github.com/bootstrap-ruby/rails-bootstrap-forms#checkboxes-and-radios

@nodrog
Copy link

nodrog commented Apr 11, 2018

@mattbrictson 's answer is a bit wrong in that the help option needs to be on the form group not on the checkbox. But it is documented as he has stated.

@lcreid
Copy link
Contributor

lcreid commented Apr 11, 2018

Thanks, @nodrog. We had a lot of challenges with the positioning of help and errors for Bootstrap 4, since it changed in significant ways. See #418, #419, #436, #448, #444, #454, etc. I think we have it right now, but if you're seeing wrong behaviour, please let us know how to reproduce the problem, and we'll look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants