To pre-select Country drop-down box in Address field, you need to add a few lines of Javascript code. Please copy the following code to Form Options > Javascript tab of your form, more specifically, inside before_load() function:
jQuery(‘#{select_country_id}’).val(‘the country name’);
jQuery(‘#{select_country_id}’).trigger(‘change’);
Please set the ID of the country field in your form instead of {select_country_id}, for instance, wdform_7_country2. Here is an example of how the final code should look like:
// Occurs before the form is loaded
function before_load() {
jQuery(‘#wdform_7_country2’).val(‘United States’);
jQuery(‘#wdform_7_country2’).trigger(‘change’);
}
10Web Help Center
Hi, how can we help?