Skip to content

Commit

Permalink
Merge pull request #27861 from colemanw/afformDefaults
Browse files Browse the repository at this point in the history
Afform - Add default values to metadata
  • Loading branch information
seamuslee001 authored Oct 19, 2023
2 parents 5b85e82 + 20f403f commit c92ea98
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ext/afform/core/Civi/Api4/Afform.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ public static function getFields($checkPermissions = TRUE) {
'name' => 'type',
'title' => E::ts('Type'),
'pseudoconstant' => ['optionGroupName' => 'afform_type'],
'default_value' => 'form',
],
[
'name' => 'requires',
Expand Down Expand Up @@ -195,16 +196,19 @@ public static function getFields($checkPermissions = TRUE) {
'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(),
],
[
Expand Down

0 comments on commit c92ea98

Please sign in to comment.