Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

description property isn't rendered for BooleanField #518

Closed
shnela opened this issue Oct 18, 2019 · 2 comments
Closed

description property isn't rendered for BooleanField #518

shnela opened this issue Oct 18, 2019 · 2 comments

Comments

@shnela
Copy link

shnela commented Oct 18, 2019

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?

@davidism
Copy link
Member

You'll need to consult Flask-Bootstrap, or whatever extension is providing the wtf template macros, about that. WTForms doesn't provide this.

@shnela
Copy link
Author

shnela commented Oct 22, 2019

right...
Question posted in proper place: mbr/flask-bootstrap#197

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants