<form class="input-field nav-panel-item nav-panel-search" style="display: none" name="search" method="GET" action="{{ path('search') }}" data-topbar-target="search">
    {% if form_errors(form) %}
        <span class="black-text">{{ form_errors(form) }}</span>
    {% endif %}
    <button type="submit" class="nav-form-button" aria-label="search"><i class="material-icons search" aria-hidden="true"></i></button>

    {% if form_errors(form.term) %}
        <span class="black-text">{{ form_errors(form.term) }}</span>
    {% endif %}

    <input type="hidden" name="currentRoute" value="{{ currentRoute }}" />

    {{ form_widget(form.term, {'attr': {'autocomplete': 'off', 'placeholder': 'entry.search.placeholder', 'data-topbar-target': 'searchInput'}}) }}
    <i class="material-icons close" aria-label="clear" role="button" data-action="click->topbar#showActions" data-shortcuts-target="showActions"></i>

    {{ form_rest(form) }}
</form>
