helloflask / bootstrap-flask

Bootstrap 4 & 5 helper for your Flask projects.

Home Page:https://bootstrap-flask.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] render_field macro leaving hidden field labels visible

caffeinatedMike opened this issue · comments

When using the render_field macro, hidden fields' labels are still shown.

Example:

{% from 'bootstrap/form.html' import render_field %}
{% extends 'base.html' %}

{% block content %}
    <div class="container">
        <form action="" method="post" class="form" role="form">
            {{ render_field(form.csrf_token) }}
        </form>
    </div>
{% endblock %}

Results in "CSRF Token" being displayed on the page