• Resolved anjanphukan

    (@anjanphukan)


    Ho there,

    Is there a way to set the default country to United States in the country dropdown?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author easyregistrationforms

    (@easyregistrationforms)

    Hello @anjanphukan,

    You can use below hook in your functions.php file:
    add_filter(‘erforms_address_country_load’,’country_load’,10,2);
    function country_load($command,$form){
    $command[‘default_value’]=’US’;
    return $command;
    }

    Thread Starter anjanphukan

    (@anjanphukan)

    Hi @easyregistrationforms Thanks a lot. The code works fine and the default country is now US.

    But do you know why the dropdown takes some seconds to load the country list? Can it be fixed?

    Plugin Author easyregistrationforms

    (@easyregistrationforms)

    Dropdown fields are dynamically fetched from database after loading the complete form. This is why it takes some time. As of now this can not be fixed. But we will look into it in future releases.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘How to set default country’ is closed to new replies.