PHPackages                             mwstake/mediawiki-component-formengine - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mwstake/mediawiki-component-formengine

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mwstake/mediawiki-component-formengine
======================================

Provides a OOJS based form engine for MediaWiki

3.1.3(3w ago)046.8k↑47.7%[1 issues](https://github.com/hallowelt/mwstake-mediawiki-component-formengine/issues)[1 PRs](https://github.com/hallowelt/mwstake-mediawiki-component-formengine/pulls)GPL-3.0-onlyJavaScriptCI passing

Since Mar 24Pushed 2w ago5 watchersCompare

[ Source](https://github.com/hallowelt/mwstake-mediawiki-component-formengine)[ Packagist](https://packagist.org/packages/mwstake/mediawiki-component-formengine)[ RSS](/packages/mwstake-mediawiki-component-formengine/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (21)Versions (60)Used By (0)

MediaWiki Stakeholders Group - Components
-----------------------------------------

[](#mediawiki-stakeholders-group---components)

FormEngine for MediaWiki
========================

[](#formengine-for-mediawiki)

Provides a OOJS based form engine for MediaWiki.

**This code is meant to be executed within the MediaWiki application context. No standalone usage is intended.**

Compatibility
-------------

[](#compatibility)

- `3.0.x` -&gt; MediaWiki 1.43
- `2.0.x` -&gt; MediaWiki 1.39
- `2.0.x` -&gt; MediaWiki 1.35

Use in a MediaWiki extension
----------------------------

[](#use-in-a-mediawiki-extension)

```
{
	"require": {
		"mwstake/mediawiki-component-formengine": "~3"
	}
}
```

Since 2.0 explicit initialization is required. This can be achived by

- either adding `"callback": "mwsInitComponents"` to your `extension.json`/`skin.json`
- or calling `mwsInitComponents();` within you extensions/skins custom `callback` method

See also [`mwstake/mediawiki-componentloader`](https://github.com/hallowelt/mwstake-mediawiki-componentloader).

Available ResourceLoader modules
--------------------------------

[](#available-resourceloader-modules)

- `ext.forms.init`
- `ext.forms.define`
- `ext.forms.standalone`
- `ext.forms.widgets`
- `ext.forms.form.less`

Requiring additional RL modules
===============================

[](#requiring-additional-rl-modules)

Forms can sometimes use fields that are not loaded in the form package. To include those packages specify them in the definition

```
{
	"name": "MyForm",
	"rlDependencies": [ "my.module" ],
	"items": {...},
	...
}
```

Inline validation
=================

[](#inline-validation)

Validate functions can be declared on the widget definition, by using the `validate` key. This function is tricky as its called also from the context of the input, so no access to the form object is possible. If you need to use other elements from the form, use this syntax

```
{
	name: 'field1',
	label: 'My field',
	type: 'text',
	validate: function( val ) {
		var form = this;
		if ( typeof this.getForm === 'function' ) {
			form = this.getForm();
		}
		if ( !( form instanceof mw.ext.forms.widget.Form ) ) {
			// No form context, we can return true here, as main validation on submit will kick in
			return true;
		}
		// Return true/false...
		// Or return a promise
	}
}
```

###  Health Score

55

—

FairBetter than 97% of packages

Maintenance96

Actively maintained with recent releases

Popularity29

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 57.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~39 days

Recently: every ~49 days

Total

49

Last Release

24d ago

Major Versions

1.0.x-dev → 2.0.02022-02-07

2.0.22 → 3.0.02025-04-25

2.0.23 → 3.0.92025-07-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/e39dfe9d3120de240053c4283e905254e8774d3278da25ad79974a8742c55192?d=identicon)[osnard](/maintainers/osnard)

![](https://www.gravatar.com/avatar/161c38b5448b71865cf0652b6974ed489dd3683b5d6e1814973cea6cb66c8f1d?d=identicon)[dsavuljesku](/maintainers/dsavuljesku)

---

Top Contributors

[![it-spiderman](https://avatars.githubusercontent.com/u/13665198?v=4)](https://github.com/it-spiderman "it-spiderman (54 commits)")[![HamishSlater](https://avatars.githubusercontent.com/u/26261210?v=4)](https://github.com/HamishSlater "HamishSlater (12 commits)")[![osnard](https://avatars.githubusercontent.com/u/1201528?v=4)](https://github.com/osnard "osnard (11 commits)")[![miriamschlindwein](https://avatars.githubusercontent.com/u/13835398?v=4)](https://github.com/miriamschlindwein "miriamschlindwein (8 commits)")[![mrglaser](https://avatars.githubusercontent.com/u/2071387?v=4)](https://github.com/mrglaser "mrglaser (4 commits)")[![DvogelHallowelt](https://avatars.githubusercontent.com/u/32163064?v=4)](https://github.com/DvogelHallowelt "DvogelHallowelt (3 commits)")[![pavloyashchenko](https://avatars.githubusercontent.com/u/105639066?v=4)](https://github.com/pavloyashchenko "pavloyashchenko (2 commits)")

### Embed Badge

![Health badge](/badges/mwstake-mediawiki-component-formengine/health.svg)

```
[![Health](https://phpackages.com/badges/mwstake-mediawiki-component-formengine/health.svg)](https://phpackages.com/packages/mwstake-mediawiki-component-formengine)
```

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.5k10](/packages/helsingborg-stad-municipio)[mediawiki/maps

Adds various mapping features to MediaWiki

84152.3k3](/packages/mediawiki-maps)[starcitizentools/citizen-skin

A beautiful, usable, responsive MediaWiki skin with in-depth extension support. Originally developed for the Star Citizen Wiki.

3376.6k](/packages/starcitizentools-citizen-skin)[civicrm/civicrm-drupal-8

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

19251.4k3](/packages/civicrm-civicrm-drupal-8)[altis/core

Core module for Altis

19228.0k3](/packages/altis-core)[pressbooks/pressbooks-aldine

Aldine is the default theme for the home page of Pressbooks networks. It is named for the Aldine Press, founded by Aldus Manutius in 1494, who is regarded by many as the world’s first publisher.

114.5k](/packages/pressbooks-pressbooks-aldine)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
