From: colemanw Date: Thu, 19 Oct 2023 13:24:09 +0000 (-0400) Subject: Afform - Add default values to metadata X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=20f403f9eb9726da19e6f4794c16357710e34a03;p=civicrm-core.git Afform - Add default values to metadata --- 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(), ], [