Composants → bpm.wizardForm

bpm.wizardForm

Formulaire multi-étapes avec stepper et validation : navigation Précédent / Suivant, validation par étape, récapitulatif final optionnel.

StableInteraction⏱ 2 min

Étape 1 sur 3

Python
bpm.wizardForm(
    steps=[
        {"title": "Identité", "content": identity_form, "validate": validate_identity},
        {"title": "Coordonnées", "content": contact_form, "validate": validate_contact},
        {"title": "Récapitulatif", "content": summary_view},
    ],
    on_complete=handle_complete,
    on_cancel=handle_cancel,
    submit_label="Créer le compte",
    show_summary=True,
)
PropTypeDéfautRequisDescription
steps{ title, description?, content, validate? }[]OuiÉtapes de l'assistant. validate() retourne true, false ou un message d'erreur (string) qui bloque le passage à l'étape suivante.
onComplete() => voidOuiCallback appelé quand la dernière étape est validée.
onCancel() => voidNonAffiche un bouton « Annuler » et reçoit le clic.
submitLabelstring"Terminer"NonLibellé du bouton de la dernière étape.
showSummarybooleanfalseNonAffiche sur la dernière étape un récapitulatif des étapes précédentes au-dessus de son contenu.
classNamestringNonClasses CSS additionnelles.

Exemples

bpm.wizardForm(
    steps=[
        {"title": "Identité", "content": identity_form},
        {"title": "Coordonnées", "content": contact_form},
        {"title": "Récapitulatif", "content": summary_view},
    ],
    on_complete=handle_complete,
)
bpm.wizardForm(
    steps=[
        {"title": "Projet", "content": project_form, "validate": validate_project},
        {"title": "Budget", "content": budget_form, "validate": validate_budget},
        {"title": "Confirmation", "content": confirm_view},
    ],
    on_complete=create_project,
    on_cancel=close_modal,
    submit_label="Lancer le projet",
    show_summary=True,
)