If your organization is primarily involved with campaigns outside of the United States, it would be helpful have all of your donation pages select a different country when a donor arrives on the page. In other cases, your organization may just want to see the states or provinces for that country, and not show the country field at all. This article shows how to do both.
- Campaign managers that edit donation pages
- Campaign managers that edit templates
- Campaign managers with Javscript experience
The process here is to install a bit of Salsascript that both sets the default country and hides the country field.
Before you begin
- Make sure that you've added the Country field on the donation page. If you need help doing that, then please click here.
- Salsa uses two-digit country codes, so you'll need to know that code before you start. Here are codes that we see a lot:
Don't see your country? Please click here for the list of valid country codes.
- Edit the template used by donation pages. Click here if you need help getting started.
- Locate the </body> tag.
- Insert a blank line just before the </body> tag.
- Click here to see the Github page where the solution lives.
- Locate and click the "Raw" button. A new window will appear that contains just the script.
- Copy the contents of the window and close it.
- Return to the template editor.
- Paste the copied text into the newly inserted line in the template.
- Change the country code by replacing
USwith your country code in this line:
- Save the template.
If you have any questions, then please gather this information.
chapter_KEYif you are in a chapter
template_KEYof the modified template
donate_page_KEY(or URL) of a donation page that uses the template
- A screenshot of the page, if possible.
Send this information to email@example.com and we'll be glad to help.