Manual:Hooks/AuthChangeFormFields/fr

Détails

 * - tableau de à partir duquel les champs sont créés
 * - tableau de description des champs (union de toutes les réponses ).
 * - descripteur de HTMLForm. La clé spéciale  peut être déclarée pour modifier l'ordre des champs.
 * - une des constantes.

va contenir la définition de HTMLForm (c'est à dire le tableau de descripteurs qui sera passé au constructeur de HTMLForm); l'accroche permet de le modifier. The form field names (array keys) will match the field names in the requests. is the result of.

Caveats:
 * Changing the requests is not allowed.
 * Adding fields which take data is not allowed (adding info fields is fine). Use an authentication provider's  method to add new fields.
 * Any validation, permission check or other business logic in the hook can be trivially circumvented by using the API. Business logic should be in the providers.
 * Any vital information must be made available via the API as well. If it's for users (e.g. the text of a CAPTCHA) use a  field in   (which can be hidden/changed for the web UI from this hook if needed). If it's for machines (e.g. the public API key for the CAPTCHA) use.

The hook is primarily meant to enhance fields defined by a provider in the same extension (e.g. change a textfield into a typeahead or other interactive widget), change the position of the widget and provide help links or other extra information. Changing form fields belonging to core or other extensions is allowed but should preferably be avoided as it makes the code more fragile.