Manual:Hooks/ActionModifyFormFields

ActionModifyFormFields
Available from version 1.18.0 (r86001, codereview)
Before creating an HTMLForm object for a page action; allows to change the fields on the form that will be generated.
Define function:
public static function onActionModifyFormFields( $name, array &$fields, Page $article ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"ActionModifyFormFields": "MediaWiki\\Extension\\MyExtension\\Hooks::onActionModifyFormFields"
	}
}
Called from: File(s): actions/FormAction.php
Interface: ActionModifyFormFieldsHook.php

For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:ActionModifyFormFields extensions.


Details

edit
  • $name: name of the action
  • &$fields: HTMLForm descriptor array
  • $article: Article object

See also

edit