Reputation: 1566
So I currently have a simple_form set up and one of my inputs is:
<%= form.input :contract, input_html: { maxlength: 60 }, placeholder: "Contract Type", label: false %>
However I would instead like to change it into a dropdown with 3 options - full time, part time and internship.
What is the correct way to achieve this?
Upvotes: 0
Views: 408
Reputation: 681
try this
<%= form.input :contract, collection: ['full time', 'part time', 'internship'], input_html: { class: "ui dropdown", maxlength: 60, }, prompt: "Contract Type", label: false %>
Upvotes: 1