A Salsa client had a business case that required that every supporter record have a
Country code. When a
Country appeared in a form, then a default
Country code would be applied. If a
Country code was not in the form, a
Country code was to be added.
The solution was to add a script that made sure that the default
Country code was applied even when the
Country code was not being collected by a form. If you'd like to have the same thing, then here are some steps that you can use.
- Edit a template. If you need this behavior Salsa-wide, then edit each of your active templates.
- Locate the
- Insert a blank link just before the
- Click here to see the page where the solution lives.
- Click on the
Rawbutton. A window will open that has only the solution content.
- 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.
- The default country is currently "US". If you'd like a different default, then change all instances of "US" to the two-digit
Countrycode of your choice. Click here to see the list of valid country codes.
- Save the template.
If you have any questions, then please gather this information
chapter KEYif you are in a chapter of another organization
template_KEYof the modified template
- The URL of a page that uses the modified template
- A screenshot, if possible
Send this information to email@example.com, and we'll be glad to help.