1

I'm using the following code to display a tree view selection box of categories:

grouped_collection_select(:logic, :logic_id, Logic.top_level, :child, :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?

dax
  • 10,779
  • 8
  • 51
  • 86
SSP
  • 2,650
  • 5
  • 31
  • 49
  • for displaying checkbox in select box http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/ i haven't tried with grouped_collection_select but i think it works checkout rails api. – Amar May 15 '12 at 13:25

1 Answers1

2

For displaying checkbox in select box jquery multiselect i haven't tried with grouped_collection_select but use select/select_tag with option_groups_from_collection_for_select it is more flexible.

Amar
  • 6,874
  • 4
  • 25
  • 23
  • to be more clear, this gives the optgroups with options. Now this needs to be wrapped inside a select tag like this `<%= select_tag "thename", option_groups_from_collection_for_select(arr, subarray, :title, :id, :name) ` – user566245 Aug 04 '14 at 15:46