How to show cities according to the state in Form using Javascript? [closed]

I got the solution for this.

Just Add This Code In Contact Form 7:

<select name="stt" id="sts" class="form-control"  required="" onchange="print_city('state', this.selectedIndex);"></select>
<select name="city" id="state" class="form-control" required=""></select>
<script language="javascript">print_state("sts");</script>

And This In Functions.php

function my_theme_scripts_function() {
   wp_enqueue_script( 'myscript', get_template_directory_uri() . '/cities.js');
}
add_action('wp_enqueue_scripts','my_theme_scripts_function'); 

You Can Take The Cities.js File From Here: https://github.com/ajayrandhawa/Indian-States-Cities-Database

In this, you can add cities you want.

For The Mail:

State: [stt]
City: [city]

This is the solution.

error code: 523