From 9004e91e9278871b4463e6a5dbf2a448f346dc3c Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 2 Sep 2022 22:58:29 -0400 Subject: [PATCH] Afform - Fix setting default required value --- ext/afform/core/Civi/Afform/AfformMetadataInjector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/afform/core/Civi/Afform/AfformMetadataInjector.php b/ext/afform/core/Civi/Afform/AfformMetadataInjector.php index 7b8eeafaf9..88c602bdc1 100644 --- a/ext/afform/core/Civi/Afform/AfformMetadataInjector.php +++ b/ext/afform/core/Civi/Afform/AfformMetadataInjector.php @@ -174,7 +174,7 @@ class AfformMetadataInjector { $params = [ 'action' => $action, 'where' => [['name', 'IN', $namesToMatch]], - 'select' => ['name', 'label', 'input_type', 'input_attrs', 'help_pre', 'help_post', 'options', 'fk_entity'], + 'select' => ['name', 'label', 'input_type', 'input_attrs', 'help_pre', 'help_post', 'options', 'fk_entity', 'required'], 'loadOptions' => ['id', 'label'], // If the admin included this field on the form, then it's OK to get metadata about the field regardless of user permissions. 'checkPermissions' => FALSE, -- 2.25.1