ConditionFlow
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.ButtonSelectWidgetfor the select (this input allows indeterminate state)x-compactto 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-dependencyto 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_formulawith a counter (expressed as#count) to create a target article with a dynamic titlereturn_pageto redirect the user to a given page after submission- remove the form's frame using the parameter
no_frame - add custom submit buttons using a schema with type "null" and "x-format" equal to "button". The button action if omitted corresponds to its key and the "submit" action is defined here MediaWiki:DefaultEditorOptions (the buttons appear conditionally based on the flow)
Schemas:
Parser function:
{{#jsonforms:Default
|schema=CheckYourCriteria
|action=create
|slot=main
|pagename_formula=CheckYourCriteria/#count
|return_page=CheckYourCriteriaCompleted
|no_frame=true
}}
loading form
See also
- Demo JsonForms
- Comments
- ConditionFlow
- Captcha
- Contact Form
- Survey
- Text editors
- SMW Ask query builder
- Upload
- Wikispeech
- Interactive demos
- Interactive JSON-Schema-Test-Suite
- Form Builder (requires permissions)
- Schema Builder (requires permissions)
- Docs: https://www.mediawiki.org/wiki/Extension:JsonForms