Just wanted to see if this was a bug or how it's meant to be. A single checkbox's label appears on the left of the checkbox? Isn't the convention to usually put the label on the right of any checkbox, even if it's by it's lonesome?
The twitter bootstrap convention is to use the label in the left side if it is only one. http://twitter.github.com/bootstrap/base-css.html#forms
I see the above example in their Basic form. Only one label, and it's on the right.
There's another checkbox example where there is a label on the left but only when it's also accompanied by a label on the right too.
You can do this markup using the :inline_label feature that will be added in the next version on SimpleForm. So by default the label will be always in the left. If you want the label in the right you will need the :inline_label option
Thanks for the heads up, but for what it's worth, it is kind of confusing that it isn't the default. As I mentioned, the label on the right seems to be the normal designer's convention and bootstrap's (when there is just a single label).
I'll reopen it and dicuss with @carlosantoniodasilva how to solve it.
You can find a solution here #424 (comment)
Maybe it just needs to be mentioned somewhere in the documentation?
@fschwahn yeah probably, but we are still thinking about how to improve this check box issue. Thanks.
Related newbie question: Is there any way to show a label above the checkbox (like with other input fields)?
@mahemoff try using :boolean_style with :nested or :inline, either in the config (for all inputs) or for a single input.
Neither of these options worked for me.
@zepsolar boolean_style: :nested worked for me. Belated thanks to @carlosantoniodasilva for that.
I think :inline_label is fine for these cases.
inline_label is already and don't require another option to Simple Form.
Users has two options:
f.input :active, inline_label: true
To render the label on the right side with the same text as the label in the left side.
f.input :active, inline_label: 'Custom Label'
To render the label on the right side with a custom text.
What we can improve is when inline_label is provided we set label to false. I'll work on this.
It was already fixed on master.
Will this be back-ported to 2.1.1 for those who do not have ability to switch to Rails 4.