From c9920ea7d3bd497a2b9c6049a5eed7c0400e15cd Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 13 Jun 2019 13:06:22 -0400 Subject: [PATCH] afform/core - When injecting APIv4 metadata, be more choosy --- ext/afform/core/afform.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/afform/core/afform.php b/ext/afform/core/afform.php index 5ab9c7547e..e1f68f59f3 100644 --- a/ext/afform/core/afform.php +++ b/ext/afform/core/afform.php @@ -189,6 +189,8 @@ function afform_civicrm_alterAngular($angular) { $entityType = $entities[$entityName]['type']; $getFields = civicrm_api4($entityType, 'getFields', [ 'where' => [['name', '=', $fieldName]], + 'select' => ['name', 'html_type', 'html_attrs', 'options'], + 'loadOptions' => TRUE, ]); foreach ($getFields as $field) { pq($afField)->attr('field-defn', json_encode($field, JSON_UNESCAPED_SLASHES)); -- 2.25.1