how to specify label for select in simpleform rails

前端 未结 1 1046
再見小時候
再見小時候 2021-01-01 18:08
<%= f.association :opportunity_status, :label => \"Status\", :input_html => {} %>
<%= f.select :source_type, options_for_select([\"lead\",\"vteam\"],[         


        
相关标签:
1条回答
  • 2021-01-01 18:41

    This is because f.select is not a simple_form method and does not support :label

    This should work for you w/ simple form

    <%= f.input :source_type, :label => "Lead or VTeam", :collection => ["lead","vteam"], :selected => "lead" %>

    Hope this helps

    0 讨论(0)
提交回复
热议问题