Open shnela opened 5 years ago
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:
Why isn't description for BooleanField rendered?
description
BooleanField
I'm using Flask-Bootstrap4
Flask-Bootstrap4
It looks like checkbox field is rendered separately here, but descriptor field is rendered for other field types only here.
descriptor
Would be someone interested in merging pull request if I've fixed that?
And workaround if someone needed:
class Form(FlaskForm): text = StringField(description='Some visible text') unique = BooleanField(label='Unique - <small>Bow this "description" is visible</small>')
I have following form definition:
And below I'm presenting how does html rendered by following template loooks like:
Here's how it looks like live:
Why isn't
description
forBooleanField
rendered?I'm using
Flask-Bootstrap4