1

I'm using crispy-forms to generate an inline-checkbox for a Boolean field using this workaround BooleanField checkbox not render correctly with crispy_forms using bootstrap, which works great except I can't seem to get my css_class to pick up. I've tried every configuration I could think of.

    Div(
        Row(
            Field('role',
                  wrapper_class='col-md-6'),
            Field('status',
                  wrapper_class='col-md-6'),
        ),
        Row(
            Field('sub_status',
                  wrapper_class='col-md-6'),
            PrependedText('smarts_monitoring', '',
                          wrapper_class='col-md-6'), #this one doesn't show up 
        ), css_class='attribute_group')
    )
Community
  • 1
  • 1
thumbtackthief
  • 6,093
  • 10
  • 41
  • 87

1 Answers1

0

PrependedText doesn't work that way.

Try PrependedText(Field('smarts_monitoring', wrapper_class='col-md-6'), '',)

Alex Riley
  • 169,130
  • 45
  • 262
  • 238