How do I use Bootstrap tooltips with the Python WTForms library?
I am creating a website using (awesome) flash framework and WTForms Plugin . Now I want to use Bootstrap show prompt on the focus of the input field ( working fiddle here ), but for that I have to give the input tag an attribute data-toggle
and title
like this:
<input data-toggle="tooltip" title="tooltip on focus!" type="text" placeholder="Focus me!" name="thename"/>
So I just added them to the expression:
{{ form.plotting_value(title='tooltip on focus!', data-toggle='tooltip', class='form-control') }}
The attribute is title
not a problem, but it data-toggle
causes
TemplateSyntaxError: Invalid function expression syntax
Does anyone know how I can add data-toggle
to an input field using WTForms?
+3
source to share