Creates a new TFormSelect element (basic select field).
TFormSelect
TFormSelect
(string $name, string $displayname, string $class, bool $required, array $elements, [string $value = ""], [bool $store = true])
-
string
$name: The name of the element. This should correspond to the field names if using with TDBForm, and should not include any spaces or special characters.
-
string
$displayname: The name that should show up to the user for this field.
-
string
$class: The HTML Class to use for the element
-
bool
$required: True if the first element can't be selected
-
array
$elements: The elements to go in the box. Key field is value, value is the displayed value.
-
string
$value: The initial value for the field. Note if using a TDBForm this value will be overridden by loadValues so it is effectively only the default for new entries.
-
bool
$store: Whether this value is persistent. Used by TDBForm to decide to save/load this value from database.
Returns a textual description of the current value
A
getValue
([$display $display = false])
-
$display
$display: True if the value is going to be used for display
Redefinition of:
- TFormElement::getValue()
- Returns a textual description of the current value
void
output
()
Redefinition of:
- TFormElement::output()
- Outputs the HTML for this tag
Redefined in descendants as:
Inherited Methods
Inherited From TFormElement
TFormElement::TFormElement()
TFormElement::getValue()
TFormElement::output()
TFormElement::setParent()
TFormElement::setValue()
TFormElement::validate()