In the interest of asking for no more information than is strictly needed, I want to use Gravity Forms to get the State and Country, then pass that along to Mailchimp.
When I use the Gravity Forms address field and only display the state and country fields, Mailchimp won’t accept the record because the address does not have all the fields and I am trying to put it into an address field. However, it appears to be uploading the country as a two character ISO country code (this is relevant later)
The logs show:
[merge_fields] => Array
(
[ADDRESS] => Array
(
[addr1] =>
[addr2] =>
[city] =>
[state] => CA
[zip] =>
[country] => US
)
…
[message] => Please enter a complete address
As a possible workaround I created a new merge field in Mailchimp - as a drop down with options of “US” or “CA”. Mailchimp rejects the entry as Gravity forms is sending the country as “United States”, which does not match “US”, even though the internal representation seems to be “US”
the logs show:
[merge_fields] => Array
(
[ADDRESS] => Array
(
[addr1] =>
[addr2] =>
[city] =>
[state] =>
[zip] =>
[country] => US
)
[COUNTRY] => United States
…
[message] => Value must be one of: US, CA (not United States)
I will be using the Mailchimp country code to sync with other databases, so I would prefer it to use the 2 letter country code consistently through out.
Mailchimp support suggests reaching out to Gravity Forms.