Duplicate Snippet
Embed Snippet on Your Site
MemberPress: Set Default Country on Registration Page
This code will help set specified country as default country for the Country field on MemberPress regisatrtion pages.
The sample code will set United States as the default country.
To change the country, the two-letter code (Alpha-2 code) for United States "US" should be changed to the two-letter code of the desired country on this line:
countryDropdown.val('US');
The two-letter country ISO codes (Alpha-2 code) are available here: https://www.iso.org/obp/ui/#search
Code Preview
php
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
Comments