From 0ef6eaa82ffa922118850565a2747125f2b7d66d Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 30 Mar 2021 10:49:20 -0400 Subject: [PATCH] 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. --- ext/afform/core/Civi/Afform/AfformMetadataInjector.php | 2 +- ext/afform/core/ang/af/afField.html | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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 @@ -