Answers.Body: <p>If I understand your question correctly, I may have just posted an answer to a similar question I had.  Hope it helps you.</p>
  
  <p><a href="https://civicrm.stackexchange.com/a/18093/2169">https://civicrm.stackexchange.com/a/18093/2169</a></p>
  
  <p>In summary, it's to use the civicrm_buildForm hook in order to tie your country and state fields together.  That will cause the states' list to be refreshed when you choose a country.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-11T10:54:23.377Z
Answers.LastActivityDate: 2017-04-11T10:54:23.377Z
Answers.LastEditDate: 2017-04-13T12:53:13.017Z
Answers.UserDisplayName: Paul B
Answers.Body: <p>Pick the country first.  I know with a standard address country is last if at all.  Put it first then it should limit the list to the states appropriate to that country.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-10T22:25:31.797Z
Answers.Text: That is how it works when the state and country fields are linked by the same address type (home, work...).  But I'm creating custom data fields where I want to tie the state and country fields together.
Answers.UserDisplayName: Karen S
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-10T02:08:04.780Z
Answers.LastActivityDate: 2017-03-10T02:08:04.780Z
Answers.UserDisplayName: Paul-Tahoe
Body: <p>I am building a profile to collect a list of states for various countries a person holds a license in.  The states/countries I'm looking for are not associated with any particular address type so I'm not seeing just the states for the selected country like you do normally. It becomes very cumbersome to sort through ALL the states for ALL the countries! Is there a way to tie the state and country fields together?</p>
  
Tags: <profile>
Title: Associate state and country fields when not tied to a particular address type
ThreadText: # Associate state and country fields when not tied to a particular address type
  
  (Asked by: username_0 on 2017-03-09)
  
  I am building a profile to collect a list of states for various countries a person holds a license in. The states/countries I'm looking for are not associated with any particular address type so I'm not seeing just the states for the selected country like you do normally. It becomes very cumbersome to sort through ALL the states for ALL the countries! Is there a way to tie the state and country fields together?
  
  **Tags:** profile
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2017-04-11. Score: 1
  
  If I understand your question correctly, I may have just posted an answer to a similar question I had. Hope it helps you.
  
  <https://civicrm.stackexchange.com/a/18093/2169>
  
  In summary, it's to use the civicrm\_buildForm hook in order to tie your country and state fields together. That will cause the states' list to be refreshed when you choose a country.
  
  
  ---
  
  ### Answer by username_2 on 2017-03-10. Score: 0
  
  Pick the country first. I know with a standard address country is last if at all. Put it first then it should limit the list to the states appropriate to that country.
  
  > **Comments:**
  > **username_0**: That is how it works when the state and country fields are linked by the same address type (home, work...).  But I'm creating custom data fields where I want to tie the state and country fields together.  
  
  ---
  
  