Modal Widgets#
- class CrispyFormModalWidget(form=None, form_class=None, **kwargs)[source]#
Bases:
ModalWidget
Renders a Bootstrap 5 Modal with a CrispyFormWidget as the body.
- Parameters:
form – The form to render in the modal.
form_class – The form class to render in the modal.
- class ModalWidget(modal_id=None, modal_title=None, modal_body=None, modal_size=None, **kwargs)[source]#
Bases:
TemplateWidget
Renders a Bootstrap 5 Modal.
- Parameters:
modal_id – The CSS ID of the modal.
modal_title – The title of the modal.
modal_body – The body of the modal, any Block.
modal_size (optional) – The size of the modal. One of ‘sm’, ‘lg’, or ‘xl’.