{% macro live_search( target_selector=None, show=False, form=None, label=None, autofocus=False ) %} {%- set search_label = label or form.search.label.text %} {%- set param_extensions = { "label": {"text": search_label}, "autocomplete": "off", } %} {% if autofocus %} {% set x=param_extensions.__setitem__("attributes", {"data-module": "autofocus"}) %} {% endif %} {% if show %} {% endif %} {% endmacro %}