can't change the height of a text field in simple_form

height, ruby-on-rails, simple-form, textfield

Solution

You need to do this

<%= f.input :message, :input_html => {:rows => 10} %>

Html text area tag attributes has two attributes namely `rows` and `cols` which lets you specify the no of rows and columns(i.e. width) of your text area. If this is not working then open the console and see if your css is overriding the height.

Problem

I've tried ``` #Default size for text inputs. config.default_input_size = 10 ``` from config/initializers/simple_form.rb I've also tried `<%= f.input :message, :input_html => {:size => 10} %>` But neither of these change a single thing about how my text fields appear.

Original source