Support

Home Forums Event Espresso Premium Set default country at top of list Reply To: Set default country at top of list

Reply To: Set default country at top of list

Author Replies
Josh # Posted on March 28, 2018 at 8:45 am

Hi there,

While there are no options for setting a default country, you can add a bit of code to your site that will change the default country to US:

add_action(
 'wp_enqueue_scripts', 
 'my_change_default_ee_country_option',  
    20
);
function my_change_default_ee_country_option(){
 $custom_js = 'jQuery(document).ready(function($){';
 $custom_js .= '$(".ee-reg-qstn-country").val("US");';
 $custom_js .= '});';
    wp_add_inline_script('ee_form_section_validation', $custom_js);
}

You can add the above to a functions plugin or into your WordPress theme’s functions.php file.

Do NOT follow this link or you will be banned from the site!