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.
            Asked
            
        
        
            Active
            
        
            Viewed 6,726 times
        
    2 Answers
2
            
            
        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
        Arvind
        
- 2,671
 - 1
 - 18
 - 32
 
- 
                    2Please note the dependency on `simple_form ~> 3.2`, your form must be using `simple_form` for this to work. – Michael Feb 19 '16 at 22:19
 - 
                    2after 2.0.0 it require simple_form – Arvind Feb 22 '16 at 04:45
 - 
                    1Thanks for updating that Arv – Michael Feb 23 '16 at 06:57
 
2
            Try the Carmen plugin:
You can also check this other stackoverflow post:
        Community
        
- 1
 - 1
 
        Chris Barretto
        
- 9,379
 - 3
 - 42
 - 45