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

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

android - Keyboard hides my half of edit-text and button below it even in scroll view -