From: Coleman Watts Date: Tue, 30 Mar 2021 14:49:20 +0000 (-0400) Subject: Afform - Fix help_pre and help_post from custom fields X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0ef6eaa82ffa922118850565a2747125f2b7d66d;p=civicrm-core.git Afform - Fix help_pre and help_post from custom fields Previously, default help_pre and help_post would not show if set for a custom field. --- diff --git a/ext/afform/core/Civi/Afform/AfformMetadataInjector.php b/ext/afform/core/Civi/Afform/AfformMetadataInjector.php index 992adfdbf3..f24b1bc16c 100644 --- a/ext/afform/core/Civi/Afform/AfformMetadataInjector.php +++ b/ext/afform/core/Civi/Afform/AfformMetadataInjector.php @@ -91,7 +91,7 @@ class AfformMetadataInjector { $params = [ 'action' => $action, 'where' => [['name', '=', $fieldName]], - 'select' => ['label', 'input_type', 'input_attrs', 'options'], + 'select' => ['label', 'input_type', 'input_attrs', 'help_pre', 'help_post', 'options'], '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, diff --git a/ext/afform/core/ang/af/afField.html b/ext/afform/core/ang/af/afField.html index 1d41d2cc13..88e226c43b 100644 --- a/ext/afform/core/ang/af/afField.html +++ b/ext/afform/core/ang/af/afField.html @@ -1,6 +1,6 @@ -