The default configuration of your new Tamaro widget is international and allows donors to enter their address, postal code, city and country of residence. However, if your target group is mainly based in the United States, there are a few things you will need to consider when customizing your widget.
Adding a State Dropdown
In order to allow donors to select their state, a new field has to be added to your Tamaro. In our article Adding Custom Fields we explain how to add custom fields to your donation form. But since adding a custom State field requires inserting all US states manually, we prepared the complete code for you. Just copy and paste the following code in your HTML and you'll be ready to go.
<script>
window.rnw.tamaro.runWidget('.rnw-widget-container', {
debug: true,
paymentFormPrefill: {
stored_customer_state: null,
},
translations: {
en: {
payment_form: {
stored_customer_state: "State",
stored_customer_state_Alaska: "Alaska",
stored_customer_state_Alabama: "Alabama",
stored_customer_state_AmericanSamoa: "American Samoa",
stored_customer_state_Arizona: "Arizona",
stored_customer_state_Arkansas: "Arkansas",
stored_customer_state_California: "California",
stored_customer_state_Colorado: "Colorado",
stored_customer_state_Connecticut: "Connecticut",
stored_customer_state_Delaware: "Delaware",
stored_customer_state_DistrictofColumbia: "District of Columbia",
stored_customer_state_FederatedStatesofMicronesia: "Federated States of Micronesia",
stored_customer_state_Florida: "Florida",
stored_customer_state_Georgia: "Georgia",
stored_customer_state_Guam: "Guam",
stored_customer_state_Hawaii: "Hawaii",
stored_customer_state_Idaho: "Idaho",
stored_customer_state_Illinois: "Illinois",
stored_customer_state_Indiana: "Indiana",
stored_customer_state_Iowa: "Iowa",
stored_customer_state_Kansas: "Kansas",
stored_customer_state_Kentucky: "Kentucky",
stored_customer_state_Louisiana: "Louisiana",
stored_customer_state_Maine: "Maine",
stored_customer_state_MarshallIslands: "Marshall Islands",
stored_customer_state_Maryland: "Maryland",
stored_customer_state_Massachusetts: "Massachusetts",
stored_customer_state_Michigan: "Michigan",
stored_customer_state_Minnesota: "Minnesota",
stored_customer_state_Mississippi: "Mississippi",
stored_customer_state_Missouri: "Missouri",
stored_customer_state_Montana: "Montana",
stored_customer_state_Nebraska: "Nebraska",
stored_customer_state_Nevada: "Nevada",
stored_customer_state_NewHampshire: "New Hampshire",
stored_customer_state_NewJersey: "New Jersey",
stored_customer_state_NewMexico: "New Mexico",
stored_customer_state_NewYork: "New York",
stored_customer_state_NorthCarolina: "North Carolina",
stored_customer_state_NorthDakota: "North Dakota",
stored_customer_state_NorthernMarianaIslands: "Northern Mariana Islands",
stored_customer_state_Ohio: "Ohio",
stored_customer_state_Oklahoma: "Oklahoma",
stored_customer_state_Oregon: "Oregon",
stored_customer_state_Palau: "Palau",
stored_customer_state_Pennsylvania: "Pennsylvania",
stored_customer_state_PuertoRico: "Puerto Rico",
stored_customer_state_RhodeIsland: "Rhode Island",
stored_customer_state_SouthCarolina: "South Carolina",
stored_customer_state_SouthDakota: "South Dakota",
stored_customer_state_Tennessee: "Tennessee",
stored_customer_state_Texas: "Texas",
stored_customer_state_Utah: "Utah",
stored_customer_state_Vermont: "Vermont",
stored_customer_state_VirginIslands: "Virgin Islands",
stored_customer_state_Virginia: "Virginia",
stored_customer_state_Washington: "Washington",
stored_customer_state_WestVirginia: "West Virginia",
stored_customer_state_Wisconsin: "Wisconsin",
stored_customer_state_Wyoming: "Wyoming"
},
},
},
slots: {
address_form_6: [
{
component: "field",
type: "select",
formName: "payment_form",
name: "stored_customer_state",
label: "payment_form.stored_customer_state",
options: [{
value: "AK",
label: "payment_form.stored_customer_state_Alaska"
},
{
value: "AL",
label: "payment_form.stored_customer_state_Alabama"
},
{
value: "AS",
label: "payment_form.stored_customer_state_AmericanSamoa"
},
{
value: "AZ",
label: "payment_form.stored_customer_state_Arizona"
},
{
value: "AR",
label: "payment_form.stored_customer_state_Arkansas"
},
{
value: "CA",
label: "payment_form.stored_customer_state_California"
},
{
value: "CO",
label: "payment_form.stored_customer_state_Colorado"
},
{
value: "CT",
label: "payment_form.stored_customer_state_Connecticut"
},
{
value: "DE",
label: "payment_form.stored_customer_state_Delaware"
},
{
value: "DC",
label: "payment_form.stored_customer_state_DistrictofColumbia"
},
{
value: "FM",
label: "payment_form.stored_customer_state_FederatedStatesofMicronesia"
},
{
value: "FL",
label: "payment_form.stored_customer_state_Florida"
},
{
value: "GA",
label: "payment_form.stored_customer_state_Georgia"
},
{
value: "GU",
label: "payment_form.stored_customer_state_Guam"
},
{
value: "HI",
label: "payment_form.stored_customer_state_Hawaii"
},
{
value: "ID",
label: "payment_form.stored_customer_state_Idaho"
},
{
value: "IL",
label: "payment_form.stored_customer_state_Illinois"
},
{
value: "IN",
label: "payment_form.stored_customer_state_Indiana"
},
{
value: "IA",
label: "payment_form.stored_customer_state_Iowa"
},
{
value: "KS",
label: "payment_form.stored_customer_state_Kansas"
},
{
value: "KY",
label: "payment_form.stored_customer_state_Kentucky"
},
{
value: "LA",
label: "payment_form.stored_customer_state_Louisiana"
},
{
value: "ME",
label: "payment_form.stored_customer_state_Maine"
},
{
value: "MH",
label: "payment_form.stored_customer_state_MarshallIslands"
},
{
value: "MD",
label: "payment_form.stored_customer_state_Maryland"
},
{
value: "MA",
label: "payment_form.stored_customer_state_Massachusetts"
},
{
value: "MI",
label: "payment_form.stored_customer_state_Michigan"
},
{
value: "MN",
label: "payment_form.stored_customer_state_Minnesota"
},
{
value: "MS",
label: "payment_form.stored_customer_state_Mississippi"
},
{
value: "MO",
label: "payment_form.stored_customer_state_Missouri"
},
{
value: "MT",
label: "payment_form.stored_customer_state_Montana"
},
{
value: "NE",
label: "payment_form.stored_customer_state_Nebraska"
},
{
value: "NV",
label: "payment_form.stored_customer_state_Nevada"
},
{
value: "NH",
label: "payment_form.stored_customer_state_NewHampshire"
},
{
value: "NJ",
label: "payment_form.stored_customer_state_NewJersey"
},
{
value: "NM",
label: "payment_form.stored_customer_state_NewMexico"
},
{
value: "NY",
label: "payment_form.stored_customer_state_NewYork"
},
{
value: "NC",
label: "payment_form.stored_customer_state_NorthCarolina"
},
{
value: "ND",
label: "payment_form.stored_customer_state_NorthDakota"
},
{
value: "MP",
label: "payment_form.stored_customer_state_NorthernMarianaIslands"
},
{
value: "OH",
label: "payment_form.stored_customer_state_Ohio"
},
{
value: "OK",
label: "payment_form.stored_customer_state_Oklahoma"
},
{
value: "OR",
label: "payment_form.stored_customer_state_Oregon"
},
{
value: "PW",
label: "payment_form.stored_customer_state_Palau"
},
{
value: "PA",
label: "payment_form.stored_customer_state_Pennsylvania"
},
{
value: "PR",
label: "payment_form.stored_customer_state_PuertoRico"
},
{
value: "RI",
label: "payment_form.stored_customer_state_RhodeIsland"
},
{
value: "SC",
label: "payment_form.stored_customer_state_SouthCarolina"
},
{
value: "SD",
label: "payment_form.stored_customer_state_SouthDakota"
},
{
value: "TN",
label: "payment_form.stored_customer_state_Tennessee"
},
{
value: "TX",
label: "payment_form.stored_customer_state_Texas"
},
{
value: "UT",
label: "payment_form.stored_customer_state_Utah"
},
{
value: "VT",
label: "payment_form.stored_customer_state_Vermont"
},
{
value: "VI",
label: "payment_form.stored_customer_state_VirginIslands"
},
{
value: "VA",
label: "payment_form.stored_customer_state_Virginia"
},
{
value: "WA",
label: "payment_form.stored_customer_state_Washington"
},
{
value: "WV",
label: "payment_form.stored_customer_state_WestVirginia"
},
{
value: "WI",
label: "payment_form.stored_customer_state_Wisconsin"
},
{
value: "WY",
label: "payment_form.stored_customer_state_Wyoming"
}]
},
]},
});
</script>
Changing the Widget's Date Format
Since we are based in Europe, our widget uses the European date format (DD-MM-YYYY). In order to make sure that your donors receive their donation confirmations with the correct date, it needs to be changed to the North American format (MM-DD-YYYY).
Please contact our support team at support@raisenow.com and we will fix this for you.
Comments
0 comments
Please sign in to leave a comment.