From 20f403f9eb9726da19e6f4794c16357710e34a03 Mon Sep 17 00:00:00 2001 From: colemanw Date: Thu, 19 Oct 2023 09:24:09 -0400 Subject: [PATCH] Afform - Add default values to metadata --- ext/afform/core/Civi/Api4/Afform.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/afform/core/Civi/Api4/Afform.php b/ext/afform/core/Civi/Api4/Afform.php index dfd1f13d0a..214ed88e5a 100644 --- a/ext/afform/core/Civi/Api4/Afform.php +++ b/ext/afform/core/Civi/Api4/Afform.php @@ -140,6 +140,7 @@ class Afform extends Generic\AbstractEntity { 'name' => 'type', 'title' => E::ts('Type'), 'pseudoconstant' => ['optionGroupName' => 'afform_type'], + 'default_value' => 'form', ], [ 'name' => 'requires', @@ -195,16 +196,19 @@ class Afform extends Generic\AbstractEntity { 'name' => 'is_public', 'title' => E::ts('Is Public'), 'data_type' => 'Boolean', + 'default_value' => FALSE, ], [ 'name' => 'permission', 'title' => E::ts('Permission'), 'data_type' => 'Array', + 'default_value' => ['access CiviCRM'], ], [ 'name' => 'permission_operator', 'title' => E::ts('Permission Operator'), 'data_type' => 'String', + 'default_value' => 'AND', 'options' => \CRM_Core_SelectValues::andOr(), ], [ -- 2.25.1