GUI: Fix entity values selector
authorColeman Watts <coleman@civicrm.org>
Tue, 19 Nov 2019 21:05:12 +0000 (16:05 -0500)
committerCiviCRM <info@civicrm.org>
Wed, 16 Sep 2020 02:13:20 +0000 (19:13 -0700)
ext/afform/gui/ang/afGuiEditor.js

index de6518bffb034816dba05888753f81d549a90579..62bb2f88c648cc44abe9b69b2b3454711bbdbfc8 100644 (file)
             if (field.fk_entity) {
               $el.crmEntityRef({entity: field.fk_entity, select:{multiple: multi}});
             } else if (field.options) {
-              var options = _.transform(field.options, function(options, val, key) {
-                options.push({id: key, text: val});
+              var options = _.transform(field.options, function(options, val) {
+                options.push({id: val.key, text: val.label});
               }, []);
               $el.select2({data: options, multiple: multi});
             } else if (dataType === 'Boolean') {