MediaWiki  REL1_19
HTMLSelectField Class Reference

A select dropdown field. More...

Inheritance diagram for HTMLSelectField:
Collaboration diagram for HTMLSelectField:

List of all members.

Public Member Functions

 getInputHTML ($value)
 This function must be implemented to return the HTML to generate the input object itself.
 validate ($value, $alldata)
 Override this function to add specific validation checks on the field input.

Detailed Description

A select dropdown field.

Basically a wrapper for Xmlselect class

Definition at line 1450 of file HTMLForm.php.


Member Function Documentation

This function must be implemented to return the HTML to generate the input object itself.

It should not implement the surrounding table cells/rows, or labels/help messages.

Parameters:
$valueString the value to set the input to; eg a default text for a text input.
Returns:
String valid HTML.

Reimplemented from HTMLFormField.

Reimplemented in HTMLSelectAndOtherField.

Definition at line 1466 of file HTMLForm.php.

HTMLSelectField::validate ( value,
alldata 
)

Override this function to add specific validation checks on the field input.

Don't forget to call parent::validate() to ensure that the user-defined callback mValidationCallback is still run

Parameters:
$valueString the value the field was submitted with
$alldataArray the data collected from the form
Returns:
Mixed Bool true on success, or String error to display.

Reimplemented from HTMLFormField.

Reimplemented in HTMLSelectAndOtherField, and HTMLBlockedUsersItemSelect.

Definition at line 1451 of file HTMLForm.php.

References HTMLFormField\flattenOptions(), and wfMsgExt().

Here is the call graph for this function:


The documentation for this class was generated from the following file: