bpm.wizardForm
Formulaire multi-étapes avec stepper et validation : navigation Précédent / Suivant, validation par étape, récapitulatif final optionnel.
É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,
)| Prop | Type | Défaut | Requis | Description |
|---|---|---|---|---|
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 | () => void | — | Oui | Callback appelé quand la dernière étape est validée. |
onCancel | () => void | — | Non | Affiche un bouton « Annuler » et reçoit le clic. |
submitLabel | string | "Terminer" | Non | Libellé du bouton de la dernière étape. |
showSummary | boolean | false | Non | Affiche sur la dernière étape un récapitulatif des étapes précédentes au-dessus de son contenu. |
className | string | — | Non | Classes 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,
)