Support

Home Forums Event Espresso Premium Removing countries – US & Canada from the form and adding Singapore and Malaysia

Removing countries – US & Canada from the form and adding Singapore and Malaysia

Posted: February 23, 2015 at 11:29 am


Rajesh Wadhwani

February 23, 2015 at 11:29 am

Hi there,

I do not seem to be able to add countries and remove the US and Canada. How do I do this?


Tony

  • Support Staff

February 23, 2015 at 12:03 pm

Hi Rajesh,

If you go to Event Espresso -> General Settings -> Countries.

You can edit the countries you have enabled there.

So for example if you select ‘United States’ within the main dropdown, on the left you will find the option ‘Country Appears in dropdown select lists’ – http://take.ms/6YedQ

Set that to No for United States and click ‘Save Country Details’.

That will remove the US from the dropdowns.

You can also do this for Canada.

Then simply select Singapore and Malaysia, setting that option to Yes for each and saving the settings.

To note, we only include ‘States’ for US and Canada currently, so you will need to manually add the states for each of those countries.

We do have a ‘State Pack’ for Malaysia available here:

https://eventespresso.com/wiki/install-new-state-province-packs/

Which can be installed and activated as a normal plugin, this will update your database with a collection of ‘states’ for Malaysia.


Lorenzo Orlando Caum

  • Support Staff

September 12, 2015 at 11:51 am

Hello again Rajesh,

We wanted to let you know about an enhancement in the current version of Event Espresso 4 that offers more flexibility for venue addresses.

First, please backup your WordPress site and upgrade to the latest release of Event Espresso 4:

https://eventespresso.com/wiki/ee4-changelog/

Next, there is some sample code in this link:

https://gist.github.com/lorenzocaum/5e2658a1f7e7a9a6b5c0

Here is an explanation of the sample code:

In the older versions of Event Espresso, you could change the formatting for the venue address. However, this would apply to all venue addresses. The new enhancement is more flexible as it allows you to change the formatting for certain countries.

In the example code, we have an entry for United Kingdom which has a country code of GB. Then we have the actual formatting which doesn’t include the province or the country name.

Just below that, we have an entry for Canada which has a country code of CA. In Canada, the zip/postal code appears as the end of the address so the formatting will show it in that order.

Below that is an entry for Germany which has a country code of DE with a specific formatting for the address.

Below that is another entry for Singapore which has a country code of SG with a specific formatting for the address.

New entries for additional countries could be added as needed.

If you have modified the venue address through an existing function, then you may consider switching to the new one mentioned in the link above.

Thanks!


Lorenzo

The support post ‘Removing countries – US & Canada from the form and adding Singapore and Malaysia’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso