0

I have an html file in my flask app with

<div>{{ form.remember_me() }} {{ form.remember_me.label }}</div>

How can I add a css class to the remember me input itself, not to the div or span around. The goal is to redesign the checkbox

David Bensoussan
  • 2,887
  • 2
  • 38
  • 55

1 Answers1

1

You can pass a variable to the constructor like this:

{{ form.remember_me(class_='yourCustomClass') }}

Have you tried that? See the quickstart guide on rendering fields here.

Till
  • 313
  • 2
  • 11