Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get rid of the div that wraps every input in a simple_form?

This input:

<%= f.input :keywords, label: false, :input_html => {:class => "span8"}, :placeholder => "Park Slope, Prospect Heights, Fort Green..." %>

Produces this:

<div class="control-group string optional">
  <div class="controls">
     <input class="string optional span8" id="search_keywords" name="search[keywords]" placeholder="Park Slope, Prospect Heights, Fort Green..." size="50" type="text" />
  </div>
</div>

How do I just generate the input alone without the divs around it?

Thanks.

like image 889
marcamillion Avatar asked Feb 09 '13 03:02

marcamillion


1 Answers

Well do something like this pass a params wrapper: false like this

<%= f.input :keywords, 
            label: false,
            wrapper: false,
            input_html: { class: 'span8' }, 
            placeholder: 'Park Slope, Prospect Heights, Fort Green...' %>

And See it would work

Hope this help

like image 188
Viren Avatar answered Oct 05 '22 17:10

Viren