JFormFieldSQL
Extends \JFormFieldListSupports a custom SQL select list
Supports a generic list of options.
since |
1.7.0 |
---|---|
package |
Joomla.Platform |
Methods
__get
Method to get certain otherwise inaccessible properties from the form field object.
__get(string $name) : mixed
since |
3.7.0 |
---|
Arguments
- $name
string
The property name for which to get the value.
Response
mixed
The property value or null.
__set
Method to set certain otherwise inaccessible properties of the form field object.
__set(string $name, mixed $value) : void
since |
3.2 |
---|
Arguments
- $name
string
The property name for which to set the value.- $value
mixed
The value of the property.
addOption
Method to add an option to the list field.
addOption(string $text, array $attributes = array()) : \JFormFieldList
since |
3.7.0 |
---|
Arguments
- $text
string
Text/Language variable of the option.- $attributes
array
Array of attributes ('name' => 'value' format)
Response
\JFormFieldList
For chaining.
getInput
Method to get the field input markup for a generic list.
getInput() : string
Use the multiple attribute to enable multiselect.
since |
3.7.0 |
---|
Response
string
The field input markup.
getOptions
Method to get the field options.
getOptions() : array
since |
3.7.0 |
---|
Response
array
The field option objects.
processQuery
Method to process the query from form.
processQuery(array $conditions, string $filters, array $defaults) : \JDatabaseQuery
since |
3.5 |
---|
Arguments
- $conditions
array
The conditions from the form.- $filters
string
The columns to filter.- $defaults
array
The defaults value to set if condition is empty.
Response
\JDatabaseQuery
The query object.
setup
Method to attach a JForm object to the field.
setup(\SimpleXMLElement $element, mixed $value, string $group = null) : boolean
see | \JFormField::setup() |
---|---|
since |
3.2 |
Arguments
- $element
\SimpleXMLElement
The SimpleXMLElement object representing the<field>
tag for the form field object.- $value
mixed
The form field value to validate.- $group
string
The field name group control value. This acts as an array container for the field. For example if the field has name="foo" and the group value is set to "bar" then the full field name would end up being "bar[foo]".
Response
boolean
True on success.
Properties
type
The form field type.
since |
1.7.0 |
---|
Type(s)
string
keyField
The keyField.
since |
3.2 |
---|
Type(s)
string
valueField
The valueField.
since |
3.2 |
---|
Type(s)
string
translate
The translate.
since |
3.2 |
---|
Type(s)
boolean
query
The query.
since |
3.2 |
---|
Type(s)
string