Answers.Body: <p>Please check, if the desired countries and states/provinces for your form are configured correctly. You find theses settings in &quot;Administer &gt; Localization &gt; Languages, Currency, Locations&quot;. There you will have to select the countries/states/provinces that should be available to choose from for your registration form.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-02-28T09:00:52.560Z
Answers.LastActivityDate: 2024-02-28T09:00:52.560Z
Answers.UserDisplayName: Guitarman
Body: <p>We are venturing into event registrations in CiviCRM (version 5.65.2) for the first time. On our form, there are a series of address fields tied to an Individual contact type. The fields show properly and work together when I'm logged in, but when I bring up the form as an anonymous user (which we want to allow), things don't work. You can change the Country field, but the State field never adjusts from its disabled state showing &quot;Choose country...&quot;. There are no errors in the browser's console. What are we missing? How do we fix this?</p>
  <p><a href="https://i.sstatic.net/hyDxX.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/hyDxX.png" alt="screenshot of address fields on form" /></a></p>
  <p><strong>Updated 26-FEB-2024</strong></p>
  <ol>
  <li>CiviCRM is installed in WordPress.</li>
  <li>The fields in question are profile fields. Here is a screenshot of the back-end setup of those fields:</li>
  </ol>
  <p><a href="https://i.sstatic.net/Fpht7.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Fpht7.png" alt="screenshot of profile fields" /></a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-02-26T02:16:03.463Z
Comments.Text: Can you check the Permissions and confirm if Anon has "CiviCRM: access AJAX API" in case that is required to load the State data after the Country data?
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-02-26T08:50:04.990Z
Comments.Text: Check you have the same location for the state and the country fields. If they are different, it breaks
Comments.UserDisplayName: Tony Horrocks
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-02-26T12:59:50.683Z
Comments.Text: What form is that? Event Online form with profiles having address fields? If this is a Drupal site, have you tried using [webform civicrm](https://www.drupal.org/project/webform_civicrm)?
Comments.UserDisplayName: jitendra - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-02-26T22:32:37.237Z
Comments.Text: @petednz-fuzion where do I check the permissions for an event registration form? This isn't formbuilder.
Comments.UserDisplayName: Mark
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-02-26T22:32:39.943Z
Comments.Text: @jitendra-fuzion yes, event online form with profiles having address fields. The site uses WordPress. I'll update my question with a screenshot of the backend setup for those fields.
Comments.UserDisplayName: Mark
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-02-28T18:51:56.193Z
Comments.Text: https://docs.civicrm.org/user/en/latest/initial-set-up/permissions-and-access-control/
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-03-01T19:19:38.093Z
Comments.Text: Thanks @petednz-fuzion. Yes, the anonymous user is checked for the CiviCRM: access AJAX API  permission.
Comments.UserDisplayName: Mark
Tags: <civievent><registration><addresses>
Title: Event registration state and country not working together
ThreadText: # Event registration state and country not working together
  
  (Asked by: username_0 on 2024-02-26)
  
  We are venturing into event registrations in CiviCRM (version 5.65.2) for the first time. On our form, there are a series of address fields tied to an Individual contact type. The fields show properly and work together when I'm logged in, but when I bring up the form as an anonymous user (which we want to allow), things don't work. You can change the Country field, but the State field never adjusts from its disabled state showing "Choose country...". There are no errors in the browser's console. What are we missing? How do we fix this?
  
  [![screenshot of address fields on form](https://i.sstatic.net/hyDxX.png)](https://i.sstatic.net/hyDxX.png)
  
  **Updated 26-FEB-2024**
  
  1. CiviCRM is installed in WordPress.
  2. The fields in question are profile fields. Here is a screenshot of the back-end setup of those fields:
  
  [![screenshot of profile fields](https://i.sstatic.net/Fpht7.png)](https://i.sstatic.net/Fpht7.png)
  
  **Tags:** civievent, registration, addresses
  
  > **Comments:**
  > **username_1**: Can you check the Permissions and confirm if Anon has "CiviCRM: access AJAX API" in case that is required to load the State data after the Country data?  
  > **username_2**: Check you have the same location for the state and the country fields. If they are different, it breaks  
  > **username_3**: What form is that? Event Online form with profiles having address fields? If this is a Drupal site, have you tried using [webform civicrm](https://www.drupal.org/project/webform_civicrm)?  
  > **username_0**: @username_1 where do I check the permissions for an event registration form? This isn't formbuilder.  
  > **username_0**: @username_3-username_1 yes, event online form with profiles having address fields. The site uses WordPress. I'll update my question with a screenshot of the backend setup for those fields.  
  > **username_1**: https://docs.civicrm.org/user/en/latest/initial-set-up/permissions-and-access-control/  
  > **username_0**: Thanks @username_1. Yes, the anonymous user is checked for the CiviCRM: access AJAX API  permission.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_4 on 2024-02-28. Score: 0
  
  Please check, if the desired countries and states/provinces for your form are configured correctly. You find theses settings in "Administer > Localization > Languages, Currency, Locations". There you will have to select the countries/states/provinces that should be available to choose from for your registration form.
  
  
  ---
  
  