stouset / twitter_bootstrap_form_for

A Rails FormBuilder DSL for generating Twitter Bootstrap forms
https://github.com/stouset/twitter_bootstrap_form_for
MIT License
409 stars 110 forks source link

Fix the inline help being invisible with addons #68

Closed hdgarrood closed 11 years ago

hdgarrood commented 11 years ago

when using the :add_on => :prepend option, the help-inline becomes invisible.

the following code will reproduce the issue when submitting the following form with an invalid value:

= twitter_bootstrap_form_for(@user, :html => { :class => "form-horizontal" }) do |user|
    = user.text_field :twitter_id, :add_on => :prepend do
      %span.add-on @

this is because the help-inline span wants to be at the same level as the input-prepend div, but it is within it. Attached code puts it in the correct place.