Using simple_form v2.1.0 in a Rails 3.2.13 application. I have simple_form where I want the flag to display with an inline label, and I want to have a "blank" normal label. Thus, the container with labels should remain in place, and the flag will be correctly positioned with other elements of the form.
If I install :label => ""or :label => " "or :label => nilor do not provide at all :label, I get the field name as a label.
If I set :label => false, the label and containing elements are not displayed at all (therefore, the checkbox is displayed in the far left corner of the page).
If I install :label => " ", I get the literal text , as expected.
There seems to be no way to tell the simple form to leave a label there, just don't put the text in your container.
Here is an example form where I am trying to set an empty label for a checkbox with an embedded label.
<%= simple_form_for @model ... %>
<%= f.input :sticky, :label => "", :inline_label => "Sticky?", :as => :boolean ... %>
<% end %>
But simple_form thinks it is smarter than me and uses a shortcut by default. I would like this to be done only if I have not specifically provided a shortcut!

source
share