Title: Problems with Address Fields
Last modified: June 7, 2021

---

# Problems with Address Fields

 *  Resolved [Ana Sofia Santana](https://wordpress.org/support/users/asantana75/)
 * (@asantana75)
 * [5 years ago](https://wordpress.org/support/topic/problems-with-address-fields/)
 * I am working on a website using Mailchimp and Easy Mailchimp Forms. One of the
   required fields are the Address fields, which in Mailchimp have been translated
   to Portuguese, as seen here: [http://eepurl.com/hAzJDz](http://eepurl.com/hAzJDz)
 * When using Easy Mailchimp Forms, the Address fields don’t show the labels in 
   Portuguese, and when I submit the form, it doesn’t allow the information to go
   through because it’s expecting a USA zip code (even though I add an address in
   Portuguese, and choose Portugal as the country).
 * Is there a way to solve this?
 * Thank you!
    Ana Sofia Santana
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fproblems-with-address-fields%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Thread Starter [Ana Sofia Santana](https://wordpress.org/support/users/asantana75/)
 * (@asantana75)
 * [5 years ago](https://wordpress.org/support/topic/problems-with-address-fields/#post-14529926)
 * Ok I have solved the translation thing, using the filters to change the labels
   of every address field, and using the labels instead of the placeholders.
    however,
   since my country is not the US or Canada, I am getting an error saying that I
   am missing a required field, which I suspect it’s the State… When I choose Portugal
   the state disappears (which is right), but when I click submit even with all 
   the fields with data, it’s saying I’m missing a field
 *  Thread Starter [Ana Sofia Santana](https://wordpress.org/support/users/asantana75/)
 * (@asantana75)
 * [5 years ago](https://wordpress.org/support/topic/problems-with-address-fields/#post-14532649)
 * UPDATE: I have tried to turn the ADDRESS field optional, and the form works fine
   like that. But I need the field to be mandatory, the only field that’s not being
   filled is the State/Prov/Region part, that “disappears” when I choose Portugal.
   I have tried to use the code:
 * function yikes_mailchimp_default_state( $default_state_value, $form_id ) {
    return‘
   N/A’; }; add_filter ( ‘yikes-mailchimp-default-state’, ‘yikes_mailchimp_default_state’,
   10, 2 );
 * But I still am not able to submit the form, it always returns “A required field
   is missing.”
 * How can I solve this?
 *  [jpowersdev](https://wordpress.org/support/users/jpowersdev/)
 * (@jpowersdev)
 * [5 years ago](https://wordpress.org/support/topic/problems-with-address-fields/#post-14533320)
 * Hi [@asantana75](https://wordpress.org/support/users/asantana75/),
 * We have a filter that allows you to ignore the “required field” check on certain
   fields. You should be able to do the following:
 *     ```
       add_filter(
           'yikes-mailchimp-ignore-required-array-field',
           function ($fields, $form_id) {
               $fields[] = 'state';
               return $fields;
           },
           10,
           2
       );
       ```
   
 * That would prevent the state field from being checked to see if it is empty. 
   You can also use the $form_id to only exempt the state on certain forms. For 
   example, forms in English you may want to leave the state field, but forms in
   Portuguese you’d ignore that field.
 * Let me know if that helps,
    Jon
 *  Thread Starter [Ana Sofia Santana](https://wordpress.org/support/users/asantana75/)
 * (@asantana75)
 * [5 years ago](https://wordpress.org/support/topic/problems-with-address-fields/#post-14534599)
 * Hi Jon,
 * I have added that code to the functions.php file and it is still not allowing
   me to subscribe when I have the address fields on the form… I want the address
   to be mandatory, just not the state field, and it’s not working like that 🙁
 * All the other things I was having trouble with I was able to solve using your
   help files, just not this one….
    Thanks Ana
 *  Thread Starter [Ana Sofia Santana](https://wordpress.org/support/users/asantana75/)
 * (@asantana75)
 * [5 years ago](https://wordpress.org/support/topic/problems-with-address-fields/#post-14538915)
 * Any idea on how to solve this?
    This is really a big problem for me, I really
   need the address fields to be mandatory, minus the state.
 *  Thread Starter [Ana Sofia Santana](https://wordpress.org/support/users/asantana75/)
 * (@asantana75)
 * [4 years, 12 months ago](https://wordpress.org/support/topic/problems-with-address-fields/#post-14554104)
 * Hello [@jpowersdev](https://wordpress.org/support/users/jpowersdev/)
 * Are there any news on this?
    I am still having this problem and I need this solved
   before I send this site to its live version.
 * Thanks
    Ana Sofia Santana
 *  Thread Starter [Ana Sofia Santana](https://wordpress.org/support/users/asantana75/)
 * (@asantana75)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/problems-with-address-fields/#post-14571085)
 * [@liljimmi](https://wordpress.org/support/users/liljimmi/), [@jpowersdev](https://wordpress.org/support/users/jpowersdev/)
   can anyone help? 🙂
 * Thank you!
 *  [jpowersdev](https://wordpress.org/support/users/jpowersdev/)
 * (@jpowersdev)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/problems-with-address-fields/#post-14583893)
 * Hi [@asantana75](https://wordpress.org/support/users/asantana75/)
 * Try this instead:
 *     ```
       add_filter(
           'yikes-mailchimp-ignore-required-array-field',
           function ($fields, $form_id) {
               $fields['state'] = true;
               return $fields;
           },
           10,
           2
       );
       ```
   
 * Let me know if that helps,
    Jon
 *  Thread Starter [Ana Sofia Santana](https://wordpress.org/support/users/asantana75/)
 * (@asantana75)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/problems-with-address-fields/#post-14584970)
 * Hello [@jpowersdev](https://wordpress.org/support/users/jpowersdev/) !
 * That worked, thank you!!!
    It does help 🙂
 * Ana
    -  This reply was modified 4 years, 11 months ago by [Ana Sofia Santana](https://wordpress.org/support/users/asantana75/).
 *  [jpowersdev](https://wordpress.org/support/users/jpowersdev/)
 * (@jpowersdev)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/problems-with-address-fields/#post-14584974)
 * Hi [@asantana75](https://wordpress.org/support/users/asantana75/),
 * Fantastic! Glad to hear it.
 * Let us know if you need anything else,
    Jon

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Problems with Address Fields’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/yikes-inc-easy-mailchimp-extender_a1c7e5.
   svg)
 * [Easy Forms for Mailchimp](https://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yikes-inc-easy-mailchimp-extender/)
 * [Active Topics](https://wordpress.org/support/plugin/yikes-inc-easy-mailchimp-extender/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yikes-inc-easy-mailchimp-extender/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yikes-inc-easy-mailchimp-extender/reviews/)

## Tags

 * [address fields](https://wordpress.org/support/topic-tag/address-fields/)
 * [translations](https://wordpress.org/support/topic-tag/translations/)

 * 10 replies
 * 2 participants
 * Last reply from: [jpowersdev](https://wordpress.org/support/users/jpowersdev/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/problems-with-address-fields/#post-14584974)
 * Status: resolved