I'm using the following code to display a tree view selection box of categories:
grouped_collection_select(:categories, :category_id, Category.top_level, :children, :name, :id, :name, :include_blank => true)
How can I change it to allow multiple selection?
Also, is it possible to have it display checkboxes instead of a select box?
try
grouped_collection_select(:categories, :category_id, Category.top_level, :children, :name, :id, :name, {:include_blank => true}, { :multiple => true }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With