I’m using the “Simpleform” gem for my rails app and I have a form embedded in a table.
One of the elements of the form is a text_area. However, the entire row of the table is very tall because of this input type. I would like to set its height so that the rows are not so tall.
How do I do that I tried the following but that didn’t seem to change anything
<% @listings.each do |listing| %>
<%= simple_form_for(listing, :html => {:multipart => true, :class=> '.form-inline'} ) do |f| %>
<tr>
<td><%= listing.id %></td>
<td><%= listing.name %></td>
<td><%= f.input :telephone %></td>
<td><%= f.input :fax %></td>
<td><%= f.input :suite %></td>
<td> <%= f.input :notes, :size => 5 %></td>
<td> <%= f.button :submit %></td>
</tr>
<% end %>
<% end %>
Any suggestions would be greatly appreciated
I think you want something like this:
The input_html option will add arbitrary attributes to the resulting HTML tag. In the case of a textarea, there is no ‘size’ attribute, only ‘cols’ or ‘rows’.
I haven’t tested this myself, but I’ve used :input_html for other HTML attributes. Let me know how you fare!