Reputation: 460
I have a column of tags[] type array and for now, I'm sending multiple values of the array by
<div class="field">
<%= form.label :tags %>
<%= form.text_field :tags, name: "vacancy[tags][]" %>
<%= form.text_field :tags, name: "vacancy[tags][]" %>
<%= form.text_field :tags, name: "vacancy[tags][]" %>
</div>
but I don't want to use multiple text_fields for multiple array values is there any way to send multiple array values in just one text_field?
Upvotes: 0
Views: 290
Reputation: 538
I think you should look at multiselect input with dynamic creation options like select2: https://select2.org/tagging#tagging-with-multi-value-select-boxes
Upvotes: 2