Manual:Hooks/ActionModifyFormFields

ActionModifyFormFields
Available from version 1.18.0 (r86001)
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": "MyExtensionHooks::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.


DetailsEdit

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

See alsoEdit