Skip to content

description property isn't rendered for BooleanField #197

@shnela

Description

@shnela

I have following form definition:

class Form(FlaskForm):
    text = StringField(description='Some visible text')
    unique = BooleanField(description="Won't be rendered")

And below I'm presenting how does html rendered by following template loooks like:

{% for field in form %}
    {{ wtf.form_field(field) }}
{% endfor %}
<div class="form-group "><label class="form-control-label" for="text">Text</label>
        <input class="form-control" id="text" name="text" type="text" value="">
        <small class="form-text text-muted">Some visible text</small>
</div>
<div class="form-check">
      <label class="form-check-label">
      <input class="form-check-input" id="unique" name="unique" type="checkbox" value="y">
Unique
     </label>
</div>

Here's how it looks like live:
image

Why isn't description for BooleanField rendered?

I'm using Flask-Bootstrap4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions