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.0(3mo ago)040.2k↑36.4%[1 PRs](https://github.com/hallowelt/mwstake-mediawiki-component-formengine/pulls)GPL-3.0-onlyJavaScriptCI passing

Since Mar 24Pushed 3mo ago6 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 1mo ago

READMEChangelog (10)Dependencies (7)Versions (54)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

51

—

FairBetter than 96% of packages

Maintenance81

Actively maintained with recent releases

Popularity29

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 58.8% 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

46

Last Release

102d ago

Major Versions

1.0.x-dev → 2.0.02022-02-07

2.0.22 → 3.0.02025-04-25

2.0.x-dev → 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 (50 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 (9 commits)")[![miriamschlindwein](https://avatars.githubusercontent.com/u/13835398?v=4)](https://github.com/miriamschlindwein "miriamschlindwein (5 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

[rainlab/blog-plugin

Blog plugin for October CMS

17257.7k](/packages/rainlab-blog-plugin)[rainlab/builder-plugin

Builder plugin for October CMS

17147.2k1](/packages/rainlab-builder-plugin)[pfefferle/wordpress-activitypub

The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format.

5671.4k1](/packages/pfefferle-wordpress-activitypub)[civicrm/civicrm-drupal-8

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

18238.1k2](/packages/civicrm-civicrm-drupal-8)[mediawiki/semantic-glossary

A terminology markup extension with a Semantic MediaWiki back-end

1352.4k](/packages/mediawiki-semantic-glossary)[humanmade/lottie-lite

A lightweight Lottie Animations Extension for WordPress

374.3k](/packages/humanmade-lottie-lite)

PHPackages © 2026

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