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

前端 未结 8 1646
耶瑟儿~
耶瑟儿~ 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 03:05

    I just had the same issue on Rails 5.1 and Bootstrap4. I did the following:

    <%= f.input :bio, input_html: {style: 'height:200px !important;'} %>

    and it works.

    0 讨论(0)
  • 2021-02-19 03:07

    Passing :input_html options override default values. You must check attributes values for css classes that can modify their behavior.

    <%= f.input : message, :as => :text, :input_html => { 'rows' => 10} %>
    
    0 讨论(0)
提交回复
热议问题