Save country in newsletter form

Highlighted
New Member
5 0 0

Hi

i'm trying to add to contacts who signup with the a newsletter form the value for Country.

i need it to then send it to mailchimp and send the appropriate welcome mail.

 

i've tried to add a tag based on the select langunge, and that worked, but i cant send the tag to mailchimp via shopsync. i can only send name, surname address and the value for the address, wich would be fine, but of course pople who sign up with the newsletter for dont have an adress.

 

i then tried to add this hidden field to the newsletter form:

 <input type="hidden" name="contact[country]" value="{% if request.host == 'exemple.fr' %}France{% elsif request.host == 'exemple.de' %}Germany{% elsif request.host == 'exemple.com' %}United Kingdom{% elsif request.host == 'exemple.es' %}Spain{% else %}Italy{% endif %}" />
  

 but that did nothing.

 

i tried to use "costumer[country]", no luck either.

 

i also tried to put a select like so:

<select id="address_country_new" name="contact[country]" data-default="{{form.country}}">{{ country_option_tags }}</select>

but again, no luck.

 

any ideas how to do this? any app that can help me?

0 Likes