Closed Faisal-nfl closed 5 years ago
I added in registration.js (according to my layout)
//= require chosen-jquery //= require country_state_select
in registration.css @import "chosen";
@import "chosen";
in form
= f.input :country_field, collection: CountryStateSelect.countries_collection - options = { form: f, field_names: { :country => :country_field, :state => :state_field } } = f.input :state_field, CountryStateSelect.state_options(options)
in js at end of from
= content_for :javascript javascript: $(document).on('ready page:load', function() { return CountryStateSelect({ country_id: "country_field_id", state_id: "state_field_id" }); });
States load first time but on changing country states remain same (which loaded first time) Did I miss something?
@Faisal-nfl you can check the dummy app inside it
I added in registration.js (according to my layout)
in registration.css
@import "chosen";
in form
in js at end of from
States load first time but on changing country states remain same (which loaded first time) Did I miss something?