contactform 7 autoselect states when click on country

I am using contactform 7, select dropdown for countries, states, is it possible to make display respective states and cities when we select the particular country in first select dropdown
enter image description here

Related posts

Leave a Reply

1 comment

  1. Add following line to your footer.php or elsewhere.Give same class name to all STATE select box.

    var $sub = $('select.states');
    
    $('#countries').first().change(function () {    
        $sub.hide();
        if (this.selectedIndex > 0)
            $sub.eq(this.selectedIndex - 1).show();
    }).change();
    

    You can do similar thing for city also.

    **NOTE:**Assuming that State select box is having states class name.