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

前端 未结 8 1695
耶瑟儿~
耶瑟儿~ 2021-02-19 02:22

I\'ve tried

  #Default size for text inputs.  
  config.default_input_size = 10

from config/initializers/simple_form.rb

I\'ve also tri

8条回答
  •  时光取名叫无心
    2021-02-19 02:43

    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.

提交回复
热议问题