From: Coleman Watts Date: Sat, 3 Sep 2022 02:58:29 +0000 (-0400) Subject: Afform - Fix setting default required value X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9004e91e9278871b4463e6a5dbf2a448f346dc3c;p=civicrm-core.git Afform - Fix setting default required value --- 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,