Skip to content

Commit

Permalink
Merge pull request #300 from mutantsan/help-text-allow-html-option
Browse files Browse the repository at this point in the history
Add allow_html option for help_text
  • Loading branch information
wardi committed Sep 15, 2021
2 parents 5268cb7 + 1ec4fc2 commit d88c20c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,10 @@ Only if this key is supplied, its value will be shown as inline help text,
Help text must be plain text, no markdown or HTML are allowed.
Help text may be provided in multiple languages like [label fields](#label).

#### `help_allow_html`

Allow HTML inside the help text if set to `true`. Default is `false`.

#### `help_inline`

Display help text inline if set to `true`. Default is `false`.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{% import 'macros/form.html' as form %}

{%- if field.help_text -%}
{% set text = h.scheming_language_text(field.help_text) %}
{{- form.info(
text=h.scheming_language_text(field.help_text),
text=text|safe if field.get('help_allow_html', false) else text,
inline=field.get('help_inline', false)
) -}}
{%- endif -%}

0 comments on commit d88c20c

Please sign in to comment.