Document nodata for HTMLFormFields
authorFlorian Schmidt <florian.schmidt.stargatewissen@gmail.com>
Mon, 23 Jan 2017 19:30:36 +0000 (20:30 +0100)
committerFlorianschmidtwelzow <florian.schmidt.stargatewissen@gmail.com>
Sat, 19 May 2018 13:48:49 +0000 (13:48 +0000)
This could be a useful feature for users of HTMLForm, so they should be
able to know about it.

Bug: T156056
Change-Id: Ib444051e38292c06ebe370465b7c751e136d42b2

includes/htmlform/HTMLForm.php

index 78e7625..91f4fb2 100644 (file)
@@ -50,6 +50,9 @@ use Wikimedia\ObjectFactory;
  *                             if 'class' is not specified, this is used as a map
  *                             through HTMLForm::$typeMappings to get the class name.
  *    'default'             -- default value when the form is displayed
+ *    'nodata'              -- if set (to any value, which casts to true), the data
+ *                             for this field will not be loaded from the actual request. Instead,
+ *                             always the default data is set as the value of this field.
  *    'id'                  -- HTML id attribute
  *    'cssclass'            -- CSS class
  *    'csshelpclass'        -- CSS class used to style help text