Mahesh
Mahesh

Reputation: 6426

Drop-down for country-states

Hi I want to implement a drop-down for countries and states.The states drop-down should change its values according to the country selected. Is there any plugin or gem to do this in rails.

Upvotes: 7

Views: 6794

Answers (2)

Arvind
Arvind

Reputation: 2781

Country State Select is a library that provides an easy API to generate Country and State / Province dropdowns for use in forms.

When implemented correctly, a State / Province dropdown is filled with appropriate regions based on what Country a user has selected.

After it's version 2.0.0 it also dependent to simple_form 3.2

you can also find cities according to the state and country name by using this gem

https://rubygems.org/gems/country_state_select

Upvotes: 2

Related Questions