0
我已經有了這個簡單的表單,我希望能夠使用CSS來設置下拉菜單的樣式。自定義簡單表單集合_選擇
input_html: { class: "form-dropdown" }
不改變風格。我如何能夠正確添加一個類到簡單的表格collection_select
以在CSS中設置樣式,還是有其他方式可以設置下拉菜單的樣式?
這是我的簡單形式:
<%= simple_form_for @document do |f| %>
<%= f.collection_select :category_id, Category.all, :id, :name, {promt: "Choose a category" }, input_html: { class: "form-dropdown" } %>
<%= f.input :title, label: "Title", label_html: { class: 'form-input' } %>
<%= f.input :pdf, label: "Upload document:" %>
<%= f.button :submit %>
<% end %>