Extension:Page Forms - MediaWiki
Jump to content
From mediawiki.org
Translate this page
Languages:
Nederlands
Türkçe
italiano
polski
português
čeština
русский
中文
Page Forms - navigation
Basics
Main page
talk
Download and installation
Quick start guide
Hosting
Special pages
Using Page Forms
PF and templates
Defining forms
Input types
Values, mappings and autocompletion
The "Edit with form" tab
Linking to forms
Creating query forms
Resources for help
Common problems
Known bugs and planned features
Getting support
Developers' documentation
Testing
About Page Forms
Authors and credits
Version history
Sites that use Page Forms
Related extensions
MediaWiki extensions manual
Page Forms
Release status:
stable
Implementation
Special page
API
Description
An extension that can be used with
Semantic MediaWiki
or
Cargo
(or by itself), that allows users to create forms for creating and editing pages that use infobox-style templates. Forms are defined within wiki pages, written in a custom markup language, and are parsed on-the-fly when a form is displayed.
Author(s)
Yaron Koren
Latest version
6.0.5 (February 2026)
Compatibility policy
Master maintains backward compatibility.
MediaWiki
>= 1.40
Database changes
No
Composer
mediawiki/page-forms
Parameters
$wgPageForms24HourTime
$wgPageFormsAutocompleteCacheTimeout
$wgPageFormsAutocompleteOnAllChars
$wgPageFormsAutoeditNamespaces
$wgPageFormsCacheAutocompleteValues
$wgPageFormsCacheFormDefinitions
$wgPageFormsCheckboxesSelectAllMinimum
$wgPageFormsDisableOutsideServices
$wgPageFormsEmbedQueryCacheTTL
$wgPageFormsGoogleMapsKey
$wgPageFormsHeightForMinimizingInstances
$wgPageFormsIgnoreTitlePattern
$wgPageFormsLinkAllRedLinksToForms
$wgPageFormsListSeparator
$wgPageFormsMainFormsMinimum
$wgPageFormsMaxAutocompleteValues
$wgPageFormsMaxLocalAutocompleteValues
$wgPageFormsRenameEditTabs
$wgPageFormsRenameMainEditTab
$wgPageFormsShowExpandAllLink
$wgPageFormsShowTabsForAllHelperForms
$wgPageFormsSimpleUpload
$wgPageFormsUseDisplayTitle
$wgPageFormsVisualEditorMaxHeight
Added rights
viewedittab
editrestrictedfields
createclass
multipageedit
Hooks used
AdminLinks
ArticlePurge
BeforePageDisplay
CanonicalNamespaces
CargoTablesActionLinks
CargoTablesSetActionLinks
CargoTablesSetAllowedActions
EditPage::importFormData
HtmlPageLinkRendererEnd
MakeGlobalVariablesScript
MultiContentSave
PageSaveComplete
PageSchemasRegisterHandlers
ParserFirstCallInit
ResourceLoaderRegisterModules
SkinTemplateNavigation::Universal
Hooks provided
PageForms::AddRLModules
PageForms::BeforeFreeTextSubst
PageForms::CreateFormField
PageForms::CreateTemplateText
PageForms::EditFormInitialText
PageForms::EditFormPreloadText
PageForms::FormPrinterSetup
PageForms::HTMLBeforeForm
PageForms::PrintRedirectForm
PageForms::RenderingEnd
PageForms::SetTargetName
PageForms::TemplateFieldEnd
PageForms::TemplateFieldStart
PageForms::UserCanEditPage
PageForms::WritePageData
Licence
GNU General Public License 2.0 or later
Download extension
Git
Browse repository
GitHub
Gerrit code review
Git commit log
Download source tarball
Example
An auto-generated form allowing the user to edit an opinion item
Translate the Page Forms extension
Vagrant role
pageforms
Issues
Open tasks
Report a bug
Page Forms
(known before 2016 as
Semantic Forms
) is an extension to MediaWiki that allows users to add, edit and query data using forms.
It was originally created as an offshoot of the
Semantic MediaWiki
extension, to be able to edit templates that store their parameters via SMW, which is why it was originally called "Semantic Forms". However, it can now also work with the alternative
Cargo
extension, or with neither extension installed.
Very simply, Page Forms allows you to have
forms for creating and editing pages
on your wiki, as well as
for querying data
, all
without any programming
Forms can be created and edited not just by administrators, but by users themselves.
The main components of Page Forms functionality are form definition pages, which exist in a separate namespace, 'Form:'.
These are pages consisting of markup code which gets parsed when a user goes to a form.
Since forms are defined strictly through these definition pages, users can themselves create and modify forms, without the need for any actual programming.
The Page Forms extension is mostly used to add and edit calls to infobox-style
templates
within pages.
A form allows a user to populate a pre-defined set of templates, as well as page sections, for any page; if Cargo or Semantic MediaWiki are used, the data within the templates can then be stored and queried.
Forms can also be used to edit the data in an existing page, and you can enable an "edit with form" tab to show up on any page.
Page Forms also supports
autocompletion of fields
, so users can easily see what the previously-entered values were for a given field. This greatly helps to avoid issues of naming ambiguity, spelling, etc.
Data in a page that doesn't fit into the form, like a free-form text description of the page's subject, isn't ignored when the page is edited with a form; rather, it is placed into a separate input box called "free text".
Page Forms also includes a wide variety of other functionality related to forms.
Below are links to the entire documentation.
Download and installation
How to download Page Forms via either Git, a standard download, or a software package; and how to install it.
Quick start guide
How to get started with Page Forms right away.
Hosting
Wiki hosting sites that support Page Forms, plus public wikis that can be used for trying out the software.
Special pages
All the "special pages" that Page Forms defines: the ones that provide helper forms (Special:CreateProperty, Special:CreateTemplate, Special:CreateForm, Special:CreateCategory, Special:CreateClass), the ones that display lists (Special:Templates, Special:Forms), the ones used to display actual forms (Special:FormEdit, Special:FormStart, Special:RunQuery, Special:UploadWindow) and one that provides a spreadsheet-like interface to edit multiple pages containing a template (Special:MultiPageEdit).
Page Forms and templates
The template-based philosophy of Page Forms - plus information on the four parser functions that PF defines for templates: #template_params, #template_display, #arraymap and #arraymaptemplate.
Defining forms
This is the first of the three major sections. How to define a form via a page within the "Form:" namespace. Covers the entire form-definition syntax, including the {{{info}}}, {{{for template}}}, {{{end template}}}, {{{field}}}, {{{section}}} and {{{standard input}}} tags. Also covers how to add tabs and tooltips.
Input types
The second major section. A listing of all allowed input types, as well as parameters for each, and the set of SMW and Cargo data types that each can be used with.
Values, mappings and autocompletion
The third major section. Information on setting possible/allowed values for the relevant input types, including "mapping" values to friendlier display names, options related to autocompletion, and the "show on select" parameter.
The "edit with form" tab
How to get the "edit with form" tab to appear on pages, using the #default_form parser function. Plus, how to rename the tab to simply "edit", and how to remove the standard "edit" tab (if you want to).
Linking to forms
How to bring users to forms, via the #forminput, #formlink, #formredlink and #queryformlink functions. Also, how to use #formredlink to have red-linked pages created automatically. Also, how to create links that directly modify a page, via the #autoedit function.
Creating query forms
Creating forms to query data, instead of to modify data, via the Special:RunQuery page.
Common problems
Common issues people have run into, and their solutions, relating to forms, data structure design, and the use of Page Forms with other extensions.
Known bugs and planned features
Known bugs in the software, and potential workarounds for them; plus features that are planned in the current "development roadmap".
Getting support
Where to ask questions, submit bug reports, submit feature requests, submit fixes, and add new translations.
Developers' documentation
Information for developers who want to modify Page Forms, or create an extension that works in tandem with it.
Authors and credits
The main authors, others who have contributed to the code, and credits to other organizations and software projects.
Version history
A version history of Page Forms, from May 2007 to the present.
Sites that use Page Forms
A small sampling of the wikis that use Page Forms, plus links to more comprehensive lists.
Related extensions
Extensions that require the presence of Page Forms, extensions that can be used together with Page Forms, and extensions that have a similar purpose to Page Forms.
Cheat sheet
Links
SMW quick reference
Cargo quick reference
Sandbox
Parser functions
{{#
arraymap
value|delimiter|var|formula|new_delimiter|conjunction
}}
{{#
arraymaptemplate
value|template|delimiter|new_delimiter
}}
{{#
forminput
:form=|size=|default value=|button text=|query string=|autocomplete on category=|autocomplete on namespace=|placeholder=|popup|no autofocus|namespace selector|
query string parameters
}}
{{#
formlink
:form=|link text=|link type=|query string=|target=|tooltip=|popup|new window|
query string parameters
}}
{{#
formredlink
:form=|link text=|existing page link text=|query string=|target=|popup|new window|create page|
query string parameters
}}
{{#
queryformlink
:form=|link text=|link type=|query string=|tooltip=|popup|new window|
query string parameters
}}
{{#
template_params
:}}
{{#
template_display
:_format=|_title=}}
{{#
autoedit
:form=|target=|link text=|link type=|minor|query string=|reload|tooltip=|redirect|bring to page=|summary=|confirm|confirm text=|
query string parameters
}}
{{#
autoedit_rating
:form=|target=|value=|star width=|num stars=|allow half stars=|minor|reload|tooltip=|summary=|confirm|
query string parameters
}}
{{#
default_form
form name
}}
Input types
text
textarea
tokens
combobox
date
datetime
year
datepicker
datetimepicker
checkbox
dropdown
radiobutton
checkboxes
listbox
tree
rating
regexp
googlemaps
leaflet
openlayers
This extension is included in the following wiki farms/hosts and/or packages:
BlueSpice
Canasta
Fandom
Miraheze
MyWikis
ProWiki
semantic::core
wiki.gg
Retrieved from "
Categories
Stable extensions
Special page extensions
API extensions
Extensions supporting Composer
AdminLinks extensions
ArticlePurge extensions
BeforePageDisplay extensions
CanonicalNamespaces extensions
CargoTablesActionLinks extensions
CargoTablesSetActionLinks extensions
CargoTablesSetAllowedActions extensions
EditPage::importFormData extensions
HtmlPageLinkRendererEnd extensions
MakeGlobalVariablesScript extensions
MultiContentSave extensions
PageSaveComplete extensions
PageSchemasRegisterHandlers extensions
ParserFirstCallInit extensions
ResourceLoaderRegisterModules extensions
SkinTemplateNavigation::Universal extensions
GPL licensed extensions
Extensions in Wikimedia version control
All extensions
Extensions included in BlueSpice
Extensions included in Canasta
Extensions included in Fandom
Extensions included in Miraheze
Extensions included in MyWikis
Extensions included in ProWiki
Extensions included in semantic::core
Extensions included in wiki.gg
Semantic MediaWiki extensions
Semantic Bundle extensions
Form extensions
Page creation extensions
Edit extensions
Template extensions
Hidden categories:
Extensions without an image
Extensions with master compatibility policy
Extension
Page Forms
Add topic
US