Demo JsonForms / ConditionFlow

ConditionFlow

From Wikisphere
Jump to navigation Jump to search

This page demonstrates the use of JsonForms to create forms with interactive/conditional flows, and specifically the following features:

  • OO.ui.ButtonSelectWidget for the select (this input allows indeterminate state)
  • x-compact to remove padding and title from the relevant subschema
  • use of x-description-format (set to "wikitext") to display the description of the schema "Request information" using wikitext
  • use of x-dependency to conditionally display a given subschema based on a condition. Only this syntax is used for this form
"x-dependency": {
	"complaint_or_info": "Lodge a complaint"
},

although more complex syntaxes are supported.

  • pagename_formula with a counter (expressed as #count) to create a target article with a dynamic title
  • return_page to redirect the user to a given page after submission
  • todo remove footer from the form, use the button format to conditionally handle the submission

Schemas:


Parser function:

{{#jsonforms:Default
|schema=CheckYourCriteria
|action=create
|slot=main
|pagename_formula=CheckYourCriteria/#count
|return_page=CheckYourCriteriaCompleted
|hide_title=true
}}


loading form



See also