From 5ef2905d3cf1da1cf851df49b370bdbf6be3c572 Mon Sep 17 00:00:00 2001 From: mike cullerton Date: Tue, 1 Mar 2022 16:17:02 -0500 Subject: [PATCH] Add Jinja templating to form field help --- crc/services/workflow_service.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crc/services/workflow_service.py b/crc/services/workflow_service.py index 15fd3456..289f7ffc 100755 --- a/crc/services/workflow_service.py +++ b/crc/services/workflow_service.py @@ -781,6 +781,15 @@ class WorkflowService(object): for i in range(len(task.form.fields)): task.data.pop(task.form.fields[i].id, None) + # Pass help text through the Jinja parser + if task.form and task.form.fields: + for field in task.form.fields: + if field.properties: + for field_property in field.properties: + if field_property.id == 'help': + jinja_text = JinjaService().get_content(field_property.value, task.data) + field_property.value = jinja_text + return task @staticmethod