Abstract Class JFormField

Description

Abstract Form Field class for the Joomla Platform.

  • abstract:
  • since: 11.1

Located in /libraries/joomla/form/field.php (line 19)


	
			
Direct descendents
Class Description
 class JFormFieldClicks Clicks Field class for the Joomla Framework.
 class JFormFieldImpMade Clicks Field class for the Joomla Framework.
 class JFormFieldImpTotal Impressions Field class for the Joomla Framework.
 class JFormFieldModal_Category Supports a modal article picker.
 class JFormFieldFilters Text Filters form field.
 class JFormFieldModal_Contact Supports a modal contact picker.
 class JFormFieldModal_Article Supports a modal article picker.
 class JFormFieldModal_Newsfeed Supports a modal newsfeeds picker.
 class JFormFieldPrefix Form Field class for the Joomla Framework.
 class JFormFieldCaptcha Form Field class for the Joomla Framework.
 class JFormFieldContenthistory Field to select a user id from a modal list.
 class JFormFieldMedia Form Field class for the Joomla CMS.
 class JFormFieldModuleOrder Form Field class for the Joomla! CMS.
 class JFormFieldOrdering Form Field class for the Joomla Platform.
 class JFormFieldUser Field to select a user ID from a modal list.
 class FOFFormFieldOrdering Form Field class for FOF Renders the row ordering interface checkbox in browse views
 class FOFFormFieldSelectrow Form Field class for FOF Renders the checkbox in browse views which allows you to select rows
 class JFormFieldCalendar Form Field class for the Joomla Platform.
 class JFormFieldCheckbox Form Field class for the Joomla Platform.
 class JFormFieldCheckboxes Form Field class for the Joomla Platform.
 class JFormFieldColor Color Form Field class for the Joomla Platform.
 class JFormFieldFile Form Field class for the Joomla Platform.
 class JFormFieldGroupedList Form Field class for the Joomla Platform.
 class JFormFieldHidden Form Field class for the Joomla Platform.
 class JFormFieldList Form Field class for the Joomla Platform.
 class JFormFieldNote Form Field class for the Joomla Platform.
 class JFormFieldNumber Form Field class for the Joomla Platform.
 class JFormFieldPassword Form Field class for the Joomla Platform.
 class JFormFieldRadio Form Field class for the Joomla Platform.
 class JFormFieldRepeatable Form Field class for the Joomla Platform.
 class JFormFieldRules Form Field class for the Joomla Platform.
 class JFormFieldSpacer Form Field class for the Joomla Platform.
 class JFormFieldText Form Field class for the Joomla Platform.
 class JFormFieldTextarea Form Field class for the Joomla Platform.
 class JFormFieldUsergroup Form Field class for the Joomla Platform.
 class JFormFieldComponentlayout Form Field to display a list of the layouts for a component view from the extension or template overrides.
 class JFormFieldModulelayout Form Field to display a list of the layouts for module display from the module or template overrides.
Variable Summary
 static integer $count
 static string $generated_fieldname
 boolean $autofocus
 mixed $class
 mixed $default
 string $description
 boolean $disabled
 SimpleXMLElement $element
 string $fieldname
 string $formControl
 string $group
 boolean $hidden
 string $hint
 string $id
 string $input
 string $label
 mixed $labelClass
 boolean $multiple
 string $name
 string $onchange
 string $onclick
 string $pattern
 boolean $readonly
 mixed $repeat
 boolean $required
 integer $size
 boolean $spellcheck
 boolean $translateHint
 boolean $translateLabel
 string $type
 string $validate
 mixed $value
Method Summary
 JFormField __construct ([JForm $form = null])
 mixed getAttribute (string $name, [mixed $default = null])
 string getControlGroup ()
 string getFieldName (string $fieldName)
 string getId (string $fieldId, string $fieldName)
 string getInput ()
 string getLabel ()
 string getName (string $fieldName)
 string getTitle ()
 boolean setup (SimpleXMLElement $element, mixed $value, [string $group = null])
 void setValue (mixed $value)
 mixed __get (string $name)
 void __set (string $name, mixed $value)
Variables
static integer $count = 0 (line 297)

The count value for generated name field

  • since: 11.1
  • access: protected
static string $generated_fieldname = '__field' (line 305)

The string used for generated fields names

  • since: 11.1
  • access: protected
mixed $autocomplete = 'on' (line 44)

The autocomplete state for the form field. If 'off' element will not be automatically completed by browser.

  • since: 3.2
  • access: protected
boolean $autofocus = false (line 61)

The autofocus request for the form field. If true element will be automatically focused on document load.

  • since: 3.2
  • access: protected
mixed $class (line 265)

The class of the form field

  • since: 3.2
  • access: protected
mixed $default (line 249)

The default value of the form field.

  • since: 11.1
  • access: protected
string $description (line 27)

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

  • since: 11.1
  • access: protected
boolean $disabled = false (line 208)

The disabled state for the form field. If true then the field will be disabled and user can't interact with the field.

  • since: 3.2
  • access: protected
SimpleXMLElement $element (line 69)

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

  • since: 11.1
  • access: protected
string $fieldname (line 182)

The name of the field.

  • since: 11.1
  • access: protected
JForm $form (line 77)

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

  • since: 11.1
  • access: protected
string $formControl (line 85)

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

  • since: 11.1
  • access: protected
string $group (line 190)

The group of the field.

  • since: 11.1
  • access: protected
boolean $hidden = false (line 93)

The hidden state for the form field.

  • since: 11.1
  • access: protected
string $hint (line 35)

The hint text for the form field used to display hint inside the field.

  • since: 3.2
  • access: protected
string $id (line 125)

The document id for the form field.

  • since: 11.1
  • access: protected
string $input (line 133)

The input for the form field.

  • since: 11.1
  • access: protected
string $label (line 141)

The label for the form field.

  • since: 11.1
  • access: protected
mixed $labelClass (line 273)

The label's CSS class of the form field

  • since: 11.1
  • access: protected
boolean $multiple = false (line 150)

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

  • since: 11.1
  • access: protected
string $name (line 174)

The name of the form field.

  • since: 11.1
  • access: protected
string $onchange (line 281)

The javascript onchange of the form field.

  • since: 3.2
  • access: protected
string $onclick (line 289)

The javascript onclick of the form field.

  • since: 3.2
  • access: protected
string $pattern (line 166)

The pattern (Reg Ex) of value of the form field.

  • since: 11.1
  • access: protected
boolean $readonly = false (line 216)

The readonly state for the form field. If true then the field will be readonly.

  • since: 3.2
  • access: protected
mixed $repeat = false (line 158)

Allows extensions to create repeat elements

  • since: 3.2
  • access: public
boolean $required = false (line 199)

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

  • since: 11.1
  • access: protected
integer $size (line 257)

The size of the form field.

  • since: 3.2
  • access: protected
boolean $spellcheck = true (line 52)

The spellcheck state for the form field.

  • since: 3.2
  • access: protected
boolean $translateDescription = true (line 109)

True to translate the field description string.

  • since: 11.1
  • access: protected
boolean $translateHint = true (line 117)

True to translate the field hint string.

  • since: 3.2
  • access: protected
boolean $translateLabel = true (line 101)

True to translate the field label string.

  • since: 11.1
  • access: protected
string $type (line 224)

The form field type.

  • since: 11.1
  • access: protected

Redefined in descendants as:
string $validate (line 233)

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

  • since: 11.1
  • access: protected
mixed $value (line 241)

The value of the form field.

  • since: 11.1
  • access: protected
Methods
Constructor __construct (line 314)

Method to instantiate the form field object.

  • since: 11.1
  • access: public
JFormField __construct ([JForm $form = null])
  • JForm $form: The form to attach to the form field object.

Redefined in descendants as:
getAttribute (line 830)

Method to get an attribute of the field

  • return: Value of the attribute / default
  • since: 3.2
  • access: public
mixed getAttribute (string $name, [mixed $default = null])
  • string $name: Name of the attribute to get
  • mixed $default: Optional value to return if attribute not found
getControlGroup (line 858)

Method to get a control group with label and input.

  • return: A string containing the html for the control goup
  • since: 3.2
  • access: public
string getControlGroup ()
getFieldName (line 806)

Method to get the field name used.

  • return: The field name
  • since: 11.1
  • access: protected
string getFieldName (string $fieldName)
  • string $fieldName: The field element name.
getId (line 587)

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

  • return: The id to be used for the field input tag.
  • since: 11.1
  • access: protected
string getId (string $fieldId, string $fieldName)
  • string $fieldId: The field element id.
  • string $fieldName: The field element name.
getInput (line 646)

Method to get the field input markup.

  • return: The field input markup.
  • abstract:
  • since: 11.1
  • access: protected
string getInput ()

Redefined in descendants as:
getLabel (line 678)

Method to get the field label markup.

  • return: The field label markup.
  • since: 11.1
  • access: protected
string getLabel ()

Redefined in descendants as:
getName (line 728)

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

  • return: The name to be used for the field input tag.
  • since: 11.1
  • access: protected
string getName (string $fieldName)
  • string $fieldName: The field element name.
getTitle (line 655)

Method to get the field title.

  • return: The field title.
  • since: 11.1
  • access: protected
string getTitle ()

Redefined in descendants as:
setForm (line 498)

Method to attach a JForm object to the field.

  • return: The form field object so that the method can be used in a chain.
  • since: 11.1
  • access: public
JFormField setForm (JForm $form)
  • JForm $form: The JForm object to attach to the form field.
setup (line 519)

Method to attach a JForm object to the field.

  • return: True on success.
  • since: 11.1
  • access: public
boolean setup (SimpleXMLElement $element, mixed $value, [string $group = null])
  • SimpleXMLElement $element: The SimpleXMLElement object representing the <field /> tag for the form field object.
  • mixed $value: The form field value to validate.
  • string $group: The 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]".

Redefined in descendants as:
setValue (line 572)

Simple method to set the value

  • since: 3.2
  • access: public
void setValue (mixed $value)
  • mixed $value: Value to set
__get (line 348)

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

  • return: The property value or null.
  • since: 11.1
  • access: public
mixed __get (string $name)
  • string $name: The property name for which to the the value.

Redefined in descendants as:
__set (line 412)

Method to set certain otherwise inaccessible properties of the form field object.

  • since: 3.2
  • access: public
void __set (string $name, mixed $value)
  • string $name: The property name for which to the the value.
  • mixed $value: The value of the property.

Redefined in descendants as:

Documentation generated on Tue, 19 Nov 2013 15:02:57 +0100 by phpDocumentor 1.4.3