Answers.Body: <p>Depends on the context:</p>
  
  <p>On a public or profile, develop a custom JS file to do this.</p>
  
  <p>On editing a CiviCRM contact through the interface there's probably no good way to do this, other than adding custom JS in an extension.</p>
  
  <p>If you're using Drupal Webform you can use the Validation Rules to show and hide fields. With some creative optioning you can get the results you need entirely through an interface.</p>
  
  <p>My recommendation is the Drupal Webform.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-27T15:39:42.510Z
Answers.LastActivityDate: 2017-03-27T15:39:42.510Z
Answers.UserDisplayName: JohnFF
Answers.Body: <p>Have a look at the <a href="https://civicrm.org/extensions/civicrm-region-lookup" rel="nofollow noreferrer">CiviCRM Region Lookup module</a> You may need to tweak the code a bit for your needs.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-27T08:03:03.267Z
Answers.LastActivityDate: 2017-03-27T08:03:03.267Z
Answers.UserDisplayName: Aidan
Body: <p>how would I get a custom field to automatically select from a list based on the answer given in a custom field where the answer has to be selected. </p>
  
  <p>Basically the user selects the Scottish local authority field from a select list (Say, Edinburgh City Council). I want a field of MSP Regions - in this case Lothian Region - to auto fill based on the local authority. </p>
  
  <p>Thanks. </p>
  
Tags: <custom-fields>
Title: Using the answer in custom field (select) to auto fill other field
ThreadText: # Using the answer in custom field (select) to auto fill other field
  
  (Asked by: username_0 on 2017-03-26)
  
  how would I get a custom field to automatically select from a list based on the answer given in a custom field where the answer has to be selected.
  
  Basically the user selects the Scottish local authority field from a select list (Say, Edinburgh City Council). I want a field of MSP Regions - in this case Lothian Region - to auto fill based on the local authority.
  
  Thanks.
  
  **Tags:** custom-fields
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2017-03-27. Score: 2
  
  Depends on the context:
  
  On a public or profile, develop a custom JS file to do this.
  
  On editing a CiviCRM contact through the interface there's probably no good way to do this, other than adding custom JS in an extension.
  
  If you're using Drupal Webform you can use the Validation Rules to show and hide fields. With some creative optioning you can get the results you need entirely through an interface.
  
  My recommendation is the Drupal Webform.
  
  
  ---
  
  ### Answer by username_2 on 2017-03-27. Score: 1
  
  Have a look at the [CiviCRM Region Lookup module](https://civicrm.org/extensions/civicrm-region-lookup) You may need to tweak the code a bit for your needs.
  
  
  ---
  
  