2

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.

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.

| improve this answer | |
1

Have a look at the CiviCRM Region Lookup module You may need to tweak the code a bit for your needs.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.