{% extends 'forms/base_widget.html' %} {% set field_value = field._value() or [] %} {% block html -%}
{# Due to the fact that ajaxifyForms function is called before we apply Taggle widget on the element the form at that point has not access to the hidden inputs which are created by taggle.js library, thus we need to create input below (which is then removed) to make sure that changes applied to this widget trigger correct events #} {% if field_value %} {% for value in field_value %} {% endfor %} {% endif %} {% endblock %} {% block javascript %} {%- endblock %}