I’m trying to generate a form using crispy form and would like to have inline headings, e.g.,
Personal Information
Name [ ]
Address [ ]
Comment
Category [ ]
Message [ ]
I see that setting the fields using
helper = FormHelper()
helper.form_class = 'form-horizontal'
helper.layout = Layout( ... )
doesn’t produce any heading, but only labels for the fields.
Does anyone know how to integrate headings into a form?
Thanks!
Sounds like your are looking for a
fieldset:Crispy Forms has a layout object for fieldsets wich you can use in this case:
layout.Fieldset