Issue
I am making a flask form that contains multiple checkbox. I have this code in the form.py file.
var_name = BooleanField('', default=False)
And I have this in the html.
<p>{{ var_name }}</p>
The checkbox that I get on the browser is too small. I guess it is the default size. How do I increase the size of the checkbox? Thank you
Solution
What you can do is, using a hint taken from the WTForms docs here, is add a class to the field::
var_name(class_ = "checkbox")
Then style it with CSS:
.checkbox {
height: 25px;
width: 25px;
}
Answered By - Jack Bashford
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.