Ich habe dieses einfache Formular und möchte das Dropdown-Menü mit CSS formatieren können.Einfaches Formular anpassen Collection_Select
Die input_html: { class: "form-dropdown" }
ändert nicht den Stil. Wie kann ich dem einfachen Formular collection_select
eine Klasse hinzufügen, um es in css zu formatieren, oder gibt es eine andere Möglichkeit, das Dropdown-Menü zu formatieren?
Das ist meine einfache Form:
<%= 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 %>