ajax - Ruby on rails collection_select. Multiple and remote not working together -
ok, have multi select box controlled chosen jquery plugin.
i can multi select working without ajax, , ajax working without multiselect, not 2 together.
here multi select works, reloads whole page when item selected (remote not working)
<%= f.collection_select :genre_cont_any, [t('genre.alternative'), t('genre.blues'), t('genre.children'), etc etc etc.............. ], :to_s, :to_s, {}, { :multiple => true, remote: true, onchange: "this.form.submit();" } %>
here ajax works fine, reloading list only, can select 1 option @ time (multiple not working)
<%= f.collection_select :genre_cont_any, [t('genre.alternative'), t('genre.blues'), t('genre.children'), etc etc etc.............. ], :to_s, :to_s, {},:data => { :multiple => true, :remote => true, onchange: "this.form.submit();" }} %>
i want able multi select, , each new addition, send ajax request , reload list.
any advice on linking great! thanks!
figured out:
<%= f.collection_select :genre_cont_any, [t('genre.alternative'), t('genre.blues'), t('genre.children'), etc etc etc.............. ], :to_s, :to_s, {},:data => { :remote => true, onchange: "this.form.submit();" }, :multiple => true %>
Comments
Post a Comment