我找到了解决办法。
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>
这个在
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\');
你可以选择城市。此处的js文件:
https://github.com/ajayrandhawa/Indian-States-Cities-DatabaseIn this, you can add cities you want.
For The Mail:
State: [stt]
City: [city]
这就是解决方案。