So, I was making an HTML template in Flask And Wanted To Put The Form Label As The PlaceHolder Of A TextBox, But when I try to do so, Flask gives an error.
My Code:
<div class="input">
{{ form.username(class="txtb", placeholder={{ form.username.label }}) }}
The Error Flask Gives:
jinja2.exceptions.TemplateSyntaxError: expected token ':', got '}'
And when I try to print the label normally like
<h4>{{ form.username.label }}</h4>
It works completely fine.
Also, this also works perfectly.
<div class="input">
{{ form.username(class="txtb", placeholder="Username") }}
I Don't Know Where I Went Wrong.
Thanks In Advance!