0

The Django Application is using Bootstrap 3 to build forms. https://github.com/dyve/django-bootstrap3

I would like to replace all checkbox fields in the form with the following

    <div class="checkbox check-success checkbox-circle">
                  <input type="checkbox" value="1" id="checkbox8">
                  <label for="checkbox8">I agree</label>
    </div>

How to customize Django Form checkbox field

bobsr
  • 3,879
  • 8
  • 30
  • 37

1 Answers1

0

You can write your own CSS for the checkbox by overriding all the bootstrap checkbox CSS, by placing it in your apps static css folder. And don't forget to import your CSS file after importing the bootstrap css file, so yours overrides bootstraps CSS.

<link rel="stylesheet" type="text/css" href="bootstrap.css">
<link rel="stylesheet" type="text/css" href="mystyle.css">

Here is a stackoverflow answer that has multiple links on how to customize the checkbox with CSS https://stackoverflow.com/a/4148544/4708186

Community
  • 1
  • 1
qasimalbaqali
  • 2,079
  • 24
  • 51