Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 768 Bytes

panel.rst

File metadata and controls

30 lines (20 loc) · 768 Bytes

Panel

Use a Panel component for confirmation messages or to highlight important sections.

from django import forms

from crispy_forms_gds.helper import FormHelper
from crispy_forms_gds.layout import HTML, Layout


class InsetForm(forms.Form):
    def __init__(self, *args, **kwargs):
        super(InsetForm, self).__init__(*args, **kwargs)
        self.helper = FormHelper()
        self.helper.layout = Layout(
            HTML.panel(
                "Application complete",
                "Your reference number <strong>HDJ2123F</strong>"
            )
        )

You can see this form live in the Demo site.