I’m trying to use the input-append feature of Twitter Bootstrap. However, I want to try and keep my code cleaner with the simple_form.
<div class="control-group string required">
<label class="string required control-label" for="video_company_id"><abbr title="required">*</abbr> Company</label>
<div class="controls">
<div class="input-append">
<%= f.text_field :company_id, :class => "span2" %>
<span class="add-on"><%= link_to image_tag('/assets/button/magnifier.png'), "#select_company", :"data-toggle" => "modal" %></span>
</div>
</div>
</div>
yields

What is a better way to write this with simple_form using f.input?
Edit to mdepolli
Thanks mdepolli. That does get me closer to where I need to be. However, it just puts the lookup inline with the form instead of an ‘add-on’.
<%= f.input :company_id, :as => :string, :class => "span2", :wrapper_html => { :class => "input-append"} %>
<%= link_to image_tag('/assets/button/magnifier.png'), "#select_company", :"data-toggle" => "modal", :class => "add-on", :wrapper_html => { :class => "input-append"} %>

edit again
with the content_tag, it takes it to the separate line

First off, let’s create a custom wrapper in the SimpleForm initializer.
In
config/initializers/simple_form.rb:Now let’s go back to your form.
Be sure to replace
@modelwith the actual instance variable attached to the ActiveRecord model you’re using.Edit: Sorry it took me a bit, ended up having to make a custom wrapper in the end.