DevOps:Doc/FlexForm
Tag: Manual revert
Tags: Reverted Visual edit
Line 1: Line 1:
[[File:FlexForm logo.png|frameless|link=]]


=== Unlock Infinite Possibilities with FlexForm: Empower Your MediaWiki! ===
=== How is FlexForm different from PageForms? ===
''FlexForm, the innovative MediaWiki extension developed for Open CSP, empowers you to unleash the full potential of your wiki. Seamlessly create and customize dynamic forms that cater to your unique requirements, whether it's gathering user feedback, conducting surveys, or efficiently managing data inputs. Say goodbye to rigid templates and welcome a new era of flexibility! With easy customization and seamless integration, FlexForm simplifies form management, enabling you to maximize productivity and engage your community effortlessly. Take charge of your wiki's data like never before and discover endless possibilities with FlexForm.''
While '''PageForms''' is built around the traditional concept of editing a single page's template through a dedicated <code>Special:FormEdit</code> screen, '''FlexForm''' approaches MediaWiki as a modern web application platform. Instead of forcing your forms into a rigid, pre-defined wiki syntax, FlexForm uses '''100% native HTML5 standards''' combined with powerful backend data processing.


'''FlexForm''' is an enhanced HTML5 Form rendering engine.
* '''Native HTML5 vs. Custom Wiki Syntax:''' With PageForms, you have to learn a proprietary form-markup language and fight its generated DOM to style it. FlexForm uses standard HTML5 <code><nowiki><form></nowiki></code> and <code><nowiki><input></nowiki></code> elements (<code><nowiki><_form></nowiki></code>, <code><nowiki><_input></nowiki></code>). If it exists in the HTML5 specification, it works in FlexForm out of the box—giving you total freedom with Bootstrap, Chameleon, custom CSS, and JavaScript.
* '''In-Context UX (No more leaving the page):''' PageForms pulls users out of their workflow to a separate Special Page just to edit data. FlexForm renders '''anywhere on any page'''—and you can place multiple independent forms on a single page. Put forms inside modals/popups, tabs, or accordions so users view and edit information in the exact same place.
* '''Decoupled from Single Templates:''' PageForms is tightly coupled to one page and its templates. FlexForm decouples the UI from the storage layer: show users ''only'' the exact fields they need to see, and let a single form submission update '''multiple templates across multiple different pages''' simultaneously.
* '''Multi-Action Workflows in One Submit:''' A single FlexForm submission is an entire workflow engine. In one click, a user can create or edit multiple pages, upload and process multiple files, convert uploaded Word or Excel documents directly into structured wiki pages/JSON, and trigger custom emails or webhooks.
* '''Enterprise Security by Design:''' Because anyone can edit wiki pages, raw HTML forms are normally a security risk. FlexForm solves this with a built-in  Validated Security Model (cryptographic tokens, strict server-side parameter whitelisting, and XSS protection), ensuring users can only submit what the form author explicitly intended.


It renders HTML5 form elements and allows editing or creating one or more pages with one form.
==== Quick Comparison: PageForms vs. FlexForm ====
 
{| class="wikitable"
When you are familiar with creating HTML5 forms you will have no problem using '''FlexForm'''.
|'''Feature / Capability'''
 
|'''PageForms'''
To get started for the first time, have a look at the [[DevOps:Doc/FlexForm/1.0/Getting started|getting started]] documentation.
|'''FlexForm'''
 
|-
'''FlexForm''' is a complete rewrite from the previous '''WSForm'''.
|'''Form Syntax'''
 
|Proprietary MediaWiki form markup
=== Why FlexForm ===
|'''Standard HTML5''' (with wiki-specific extensions)
Currently there are several MediaWiki extensions that help you create Forms for your website.
|-
 
|'''Where Forms Live'''
What makes '''FlexForm''' different from the other extensions, is that it is really flexible. You can create a simple form (or a complex one) on any page and in any namespace.
|Dedicated <code>Special:FormEdit</code> page (or limited <code>autoedit</code> link)
 
|'''Anywhere:''' inline on any page, multiple forms per page, modals, or tabs
You do not have to use any special page to setup a form or to render it.
|-
 
|'''Scope of a Single Submit'''
It is also not bound to any kind of styling. This means that a simple form will not look very nice by default, but adding some css styling classes to the form gives you all the freedom in styling the form to any and all your needs. For those who are a bit less stylish, '''FlexForm''' will be supporting MediaWiki OOUI styling in the future by means of Themes.
|Edits 1 page and its tightly coupled template(s)
 
|Creates/edits '''multiple pages''', multiple templates, or specific slots at once
'''FlexForm''' has Themes support.
|-
 
|'''Data Formats'''
 
|Wikitext templates
'''FlexForm''' is very powerful.
|Wikitext templates, '''JSON (e.g., JSON Schema)''', and MCR Slots
 
|-
'''One''' single form can:
|'''File Uploads & Processing'''
 
|Basic single-file upload field
* create a page in the Wiki
|Multi-file dropzones, '''automatic Word/Excel-to-Wiki conversion''', custom naming
* create several pages in the Wiki
|-
* can edit a page in the Wiki
|'''Post-Submit Actions'''
* can edit several pages in the Wiki
|Saves the page
* can edit Multi Revision Content slots
|Saves page(s), '''sends templated emails''', triggers webhooks/extensions
* can send an email
|-
* can upload a file
|'''Styling & UI Freedom'''
* can upload multiple files
|Rigid layout; hard to customize with modern CSS frameworks
* Convert Word to a Wiki page
|'''100% flexible:''' native support for Bootstrap, Chameleon, and custom JS
* Convert Excel to JSON
|}
* Send a message to a Wiki user or users
 
Or do a combination of all of the above.
 
There are also Show on Select options, Multiple instances options and submit a form through Ajax (so the user stays on the page without any reload).
 
If you still want more features, check the documentation on the right.
 
=== How is it different from PageForms? ===
Some of the main difference are:
 
* PageForms will render forms through its Special page. The only exception is the ''autoedit'' parser function that will allow to edit a parameter in a template on a page using Ajax.
* PageForms renders an edit button on a page. With it you can edit Template parameters on a page.
* FlexForm can render a form on any page or render several forms on page. It allows for editing multiple Template parameters on a page or different pages.
* FlexForm will not read the content and template of a page and render an edit form. It does allow for you to create a very simple form that gives you all the freedom to show only relevant information to be edited.
* FlexForm is designed to handle multiple tasks with one form. Create or edit page(s), send an email, upload one or multiple files or a combination.
* FlexForm can be combined with the Chameleon skin and Bootstrap (or with custom js/css) to render forms in a popup, tab or collapsible element to create a more user-friendly experience where editing is part of the same page where you are also displaying information.

Revision as of 18:30, 11 November 2026

How is FlexForm different from PageForms?

While PageForms is built around the traditional concept of editing a single page's template through a dedicated Special:FormEdit screen, FlexForm approaches MediaWiki as a modern web application platform. Instead of forcing your forms into a rigid, pre-defined wiki syntax, FlexForm uses 100% native HTML5 standards combined with powerful backend data processing.

  • Native HTML5 vs. Custom Wiki Syntax: With PageForms, you have to learn a proprietary form-markup language and fight its generated DOM to style it. FlexForm uses standard HTML5 <form> and <input> elements (<_form>, <_input>). If it exists in the HTML5 specification, it works in FlexForm out of the box—giving you total freedom with Bootstrap, Chameleon, custom CSS, and JavaScript.
  • In-Context UX (No more leaving the page): PageForms pulls users out of their workflow to a separate Special Page just to edit data. FlexForm renders anywhere on any page—and you can place multiple independent forms on a single page. Put forms inside modals/popups, tabs, or accordions so users view and edit information in the exact same place.
  • Decoupled from Single Templates: PageForms is tightly coupled to one page and its templates. FlexForm decouples the UI from the storage layer: show users only the exact fields they need to see, and let a single form submission update multiple templates across multiple different pages simultaneously.
  • Multi-Action Workflows in One Submit: A single FlexForm submission is an entire workflow engine. In one click, a user can create or edit multiple pages, upload and process multiple files, convert uploaded Word or Excel documents directly into structured wiki pages/JSON, and trigger custom emails or webhooks.
  • Enterprise Security by Design: Because anyone can edit wiki pages, raw HTML forms are normally a security risk. FlexForm solves this with a built-in Validated Security Model (cryptographic tokens, strict server-side parameter whitelisting, and XSS protection), ensuring users can only submit what the form author explicitly intended.

Quick Comparison: PageForms vs. FlexForm

Feature / Capability PageForms FlexForm
Form Syntax Proprietary MediaWiki form markup Standard HTML5 (with wiki-specific extensions)
Where Forms Live Dedicated Special:FormEdit page (or limited autoedit link) Anywhere: inline on any page, multiple forms per page, modals, or tabs
Scope of a Single Submit Edits 1 page and its tightly coupled template(s) Creates/edits multiple pages, multiple templates, or specific slots at once
Data Formats Wikitext templates Wikitext templates, JSON (e.g., JSON Schema), and MCR Slots
File Uploads & Processing Basic single-file upload field Multi-file dropzones, automatic Word/Excel-to-Wiki conversion, custom naming
Post-Submit Actions Saves the page Saves page(s), sends templated emails, triggers webhooks/extensions
Styling & UI Freedom Rigid layout; hard to customize with modern CSS frameworks 100% flexible: native support for Bootstrap, Chameleon, and custom JS