mw.htmlform.Element

Allows custom data specific to HTMLFormField to be set for OOUI forms. This picks up the extra config from a matching PHP widget (defined in HTMLFormElement.php) when constructed using OO.ui.infuse().

Currently only supports passing 'cond-state' data.

Constructor

new mw.htmlform.Element(config) #

Create an instance of mw.htmlform.Element.

Parameters:

Name Type Attributes Description
config Object optional

Configuration options

Properties:
Name Type Attributes Description
condState Object.<string, Array.<string>> optional

typically corresponds to a data-cond-state attribute that is found on HTMLForm elements and used during htmlform.enhance. For more information on the format see the private function conditionParse in resources/src/mediawiki.htmlform/cond-state.js.

Source: