Data structure that can be used to build the UI (only use it if it is helpful. Might be easier to just
hardcode all in the template).
Make sure to prefix the name of any
input
created here, so the names don't clash with real fields in
the form.
{% for value, verbose_name in choices %}
- {{ verbose_name }} (
{{ value }}
)
{% endfor %}
Save the resulting selection as a class name into the textarea with
name={{ name }}
. It expects something like:
visible-print-block
{{ widget_html }}
Other Template variables:
id: {{ id }} (css id of the textarea)
name: {{ name }}
value: {{ value }}