JFormFieldMenu

Extends \JFormFieldList

Supports an HTML select list of menus

Supports a generic list of options.

package

Joomla.Libraries

subpackage

Form

since

1.6.0

Methods

__construct

Method to instantiate the form field object.

__construct(object $form = null) 
inherited
since

11.1

Arguments

$form

objectThe form to attach to the form field object.

__get

Method to get certain otherwise inaccessible properties from the form field object.

__get(string $name) : mixed
inherited
since

11.1

Arguments

$name

stringThe property name for which to the the value.

Response

mixedThe property value or null.

getFieldName

Method to get the field name used.

getFieldName(string $fieldName) : string
inherited
since

11.1

Arguments

$fieldName

stringThe field element name.

Response

stringThe field name

getId

Method to get the id used for the field input tag.

getId(string $fieldId, string $fieldName) : string
inherited
since

11.1

Arguments

$fieldId

stringThe field element id.

$fieldName

stringThe field element name.

Response

stringThe id to be used for the field input tag.

getInput

Method to get the field input markup.

getInput() : string
inherited abstract
since

11.1

Response

stringThe field input markup.

getLabel

Method to get the field label markup.

getLabel() : string
inherited
since

11.1

Response

stringThe field label markup.

getName

Method to get the name used for the field input tag.

getName(string $fieldName) : string
inherited
since

11.1

Arguments

$fieldName

stringThe field element name.

Response

stringThe name to be used for the field input tag.

getOptions

Method to get the field options.

getOptions() : array
inherited
since

11.1

Response

arrayThe field option objects.

getTitle

Method to get the field title.

getTitle() : string
inherited
since

11.1

Response

stringThe field title.

setForm

Method to attach a JForm object to the field.

setForm(\JForm $form) : object
inherited
since

11.1

Arguments

$form

\JFormThe JForm object to attach to the form field.

Response

objectThe form field object so that the method can be used in a chain.

setup

Method to attach a JForm object to the field.

setup( &$element, mixed $value, string $group = null) : boolean
inherited
since

11.1

Arguments

$element

$value

mixedThe form field value to validate.

$group

stringThe field name group control value. This acts as 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

booleanTrue on success.

Properties

type

The form field type.

inherited
since

11.1

Type(s)

string

description

The description text for the form field. Usually used in tooltips.

inherited
since

11.1

Type(s)

string

element

The SimpleXMLElement object of the XML element that describes the form field.

inherited
since

11.1

Type(s)

\SimpleXMLElement

form

The JForm object of the form attached to the form field.

inherited
since

11.1

Type(s)

\JForm

formControl

The form control prefix for field names from the JForm object attached to the form field.

inherited
since

11.1

Type(s)

string

hidden

The hidden state for the form field.

inherited
since

11.1

Type(s)

boolean

translateLabel

True to translate the field label string.

inherited
since

11.1

Type(s)

boolean

translateDescription

True to translate the field description string.

inherited
since

11.1

Type(s)

boolean

id

The document id for the form field.

inherited
since

11.1

Type(s)

string

input

The input for the form field.

inherited
since

11.1

Type(s)

string

label

The label for the form field.

inherited
since

11.1

Type(s)

string

multiple

The multiple state for the form field. If true then multiple values are allowed for the field. Most often used for list field types.

inherited
since

11.1

Type(s)

boolean

name

The name of the form field.

inherited
since

11.1

Type(s)

string

fieldname

The name of the field.

inherited
since

11.1

Type(s)

string

group

The group of the field.

inherited
since

11.1

Type(s)

string

required

The required state for the form field. If true then there must be a value for the field to be considered valid.

inherited
since

11.1

Type(s)

boolean

validate

The validation method for the form field. This value will determine which method is used to validate the value for a field.

inherited
since

11.1

Type(s)

string

value

The value of the form field.

inherited
since

11.1

Type(s)

mixed

labelClass

The label's CSS class of the form field

inherited
since

11.1

Type(s)

mixed

count

The count value for generated name field

inherited static
since

11.1

Type(s)

integer

generated_fieldname

The string used for generated fields names

inherited static
since

11.1

Type(s)

integer