We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
My code: = select_tag :movie_id, options_for_select(Movie.map{|c| [c.to_s, c.id]}), { onchange: 'this.form.submit()', class: 'chosen-select' }
= select_tag :movie_id, options_for_select(Movie.map{|c| [c.to_s, c.id]}), { onchange: 'this.form.submit()', class: 'chosen-select' }
Expected behaviour: having added onchange: 'this.form.submit()', whenever a value is selected the form gets submitted.
onchange: 'this.form.submit()'
Current behaviour: does not work with onchange: 'this.form.submit()'
The text was updated successfully, but these errors were encountered:
actually, adding onchange: 'this.form.submit()' to the javascript kind of helps:
(function() { $(function() { return $('.chosen-select').chosen({ onchange: 'this.form.submit()', allow_single_deselect: true, no_results_text: 'No results matched', width: '200px' }); }); }).call(this);
Sorry, something went wrong.
what is ur rails version? did using this.form.requestSubmit() helps?
this.form.requestSubmit()
In Rail 7
<%= f.select :city, ["Berlin", "Chicago", "Madrid"] , {include_blank: "none"} ,onchange: "this.form.requestSubmit()" %> <%= f.collection_select :user_id, User.all,:id,:email,{include_blank: "none"} , {onchange: "this.form.requestSubmit()"} %>
No branches or pull requests
My code:
= select_tag :movie_id, options_for_select(Movie.map{|c| [c.to_s, c.id]}), { onchange: 'this.form.submit()', class: 'chosen-select' }
Expected behaviour:
having added
onchange: 'this.form.submit()'
, whenever a value is selected the form gets submitted.Current behaviour:
does not work with
onchange: 'this.form.submit()'
The text was updated successfully, but these errors were encountered: