Using "hints" with simple_form and Zurb Foundation

If you’re using the simple_form gem with Zurb foundation, and you want to use “hints”, you’ll want to do the following:

  1. Uncomment this line in config/initializers/simple_form_foundation.rb:
# b.use :hint,  :wrap_with => { :tag => :span, :class => :hint }
  1. Change the “span” to “div”, like this:
b.use :hint,  :wrap_with => { :tag => :div, :class => :hint }
  1. 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!