If you’re using the simple_form gem with Zurb foundation, and you want to use “hints”, you’ll want to do the following:
- Uncomment this line in
config/initializers/simple_form_foundation.rb
:
# b.use :hint, :wrap_with => { :tag => :span, :class => :hint }
- Change the “span” to “div”, like this:
b.use :hint, :wrap_with => { :tag => :div, :class => :hint }
- Create a style like this:
.hint {
margin: -14px 0 12px;
font-size: 12px;
color: gray;
}
.error + .hint {
margin: 0 0 12px;
}
Then you can use the hint
attribute with SimpleForm!