We've moved discussions to Discord

Form.check_box not appearing correctly

Tom Iwaniec
I've made a couple sample projects that I'm playing around with and on each one the form.check_box does not appear correctly. Here's the code:

<%= form.check_box :private, class: "form-control" %>

And here's how it appears:
Screen Shot 2020-06-04 at 2.10.21 PM.png 47.4 KB


It still "works" even though you can't see it and clicking it doesn't change the look of it at all. Everything else works perfectly with the CSS and forms so I'm not sure why this wouldn't.
Chris Oliver
Check boxes and radio buttons are more complicated than regular fields, so they don't get a form-control class on them. You don't want a border around the check box like you do with a text field for example.

The new user registration view has a check box for terms of service that you can use as an example.
Tom Iwaniec
Thanks, Chris!
Bung Firman
form1.png 114 KB


Hi  Chris Oliver the new form check_box does not appear correctly, even for new sign_up for https://jumpstartrails.com/users/sign_up
please take a look
Notifications
You’re not receiving notifications from this thread.