Difference between revisions of "JForm"
From Joomla! Documentation
m (→User contributed notes: moving preparation) |
m (moving preparation) |
||
Line 14: | Line 14: | ||
|- | |- | ||
|public | |public | ||
− | |[[JForm::__construct | + | |[[API17:JForm::__construct|__construct]] |
|Method to instantiate the form object. | |Method to instantiate the form object. | ||
|- | |- | ||
|public | |public | ||
− | |[[JForm::bind | + | |[[API17:JForm::bind|bind]] |
|Method to bind data to the form. | |Method to bind data to the form. | ||
|- | |- | ||
|public | |public | ||
− | |[[JForm::filter | + | |[[API17:JForm::filter|filter]] |
|Method to filter the form data. | |Method to filter the form data. | ||
|- | |- | ||
|public | |public | ||
− | |[[JForm::getErrors | + | |[[API17:JForm::getErrors|getErrors]] |
|Return all errors, if any. | |Return all errors, if any. | ||
|- | |- | ||
|public | |public | ||
− | |[[JForm::getField | + | |[[API17:JForm::getField|getField]] |
|Method to get a form field represented as a object. | |Method to get a form field represented as a object. | ||
|- | |- | ||
|public | |public | ||
− | |[[JForm::getFieldAttribute | + | |[[API17:JForm::getFieldAttribute|getFieldAttribute]] |
|Method to get an attribute value from a field XML element. | |Method to get an attribute value from a field XML element. | ||
|- | |- | ||
|public | |public | ||
− | |[[JForm::getFieldset | + | |[[API17:JForm::getFieldset|getFieldset]] |
|Method to get an array of objects in a given fieldset by name. | |Method to get an array of objects in a given fieldset by name. | ||
|- | |- | ||
|public | |public | ||
− | |[[JForm::getFieldsets | + | |[[API17:JForm::getFieldsets|getFieldsets]] |
|Method to get an array of fieldset objects optionally filtered over a given field group. | |Method to get an array of fieldset objects optionally filtered over a given field group. | ||
|- | |- | ||
|public | |public | ||
− | |[[JForm::getFormControl | + | |[[API17:JForm::getFormControl|getFormControl]] |
|Method to get the form control. | |Method to get the form control. | ||
|- | |- | ||
|public | |public | ||
− | |[[JForm::getGroup | + | |[[API17:JForm::getGroup|getGroup]] |
|Method to get an array of objects in a given field group by name. | |Method to get an array of objects in a given field group by name. | ||
|- | |- | ||
|public | |public | ||
− | |[[JForm::getInput | + | |[[API17:JForm::getInput|getInput]] |
|Method to get a form field markup for the field input. | |Method to get a form field markup for the field input. | ||
|- | |- | ||
|public | |public | ||
− | |[[JForm::getLabel | + | |[[API17:JForm::getLabel|getLabel]] |
|Method to get a form field markup for the field input. | |Method to get a form field markup for the field input. | ||
|- | |- | ||
|public | |public | ||
− | |[[JForm::getName | + | |[[API17:JForm::getName|getName]] |
|Method to get the form name. | |Method to get the form name. | ||
|- | |- | ||
|public | |public | ||
− | |[[JForm::getValue | + | |[[API17:JForm::getValue|getValue]] |
|Method to get the value of a field. | |Method to get the value of a field. | ||
|- | |- | ||
|public | |public | ||
− | |[[JForm::load | + | |[[API17:JForm::load|load]] |
|Method to load the form description from an XML string or object. | |Method to load the form description from an XML string or object. | ||
|- | |- | ||
|public | |public | ||
− | |[[JForm::loadFile | + | |[[API17:JForm::loadFile|loadFile]] |
|Method to load the form description from an XML file. | |Method to load the form description from an XML file. | ||
|- | |- | ||
|public | |public | ||
− | |[[JForm::removeField | + | |[[API17:JForm::removeField|removeField]] |
|Method to remove a field from the form definition. | |Method to remove a field from the form definition. | ||
|- | |- | ||
|public | |public | ||
− | |[[JForm::removeGroup | + | |[[API17:JForm::removeGroup|removeGroup]] |
|Method to remove a group from the form definition. | |Method to remove a group from the form definition. | ||
|- | |- | ||
|public | |public | ||
− | |[[JForm::reset | + | |[[API17:JForm::reset|reset]] |
|Method to reset the form data store and optionally the form XML definition. | |Method to reset the form data store and optionally the form XML definition. | ||
|- | |- | ||
|public | |public | ||
− | |[[JForm::setField | + | |[[API17:JForm::setField|setField]] |
|Method to set a field XML element to the form definition. | |Method to set a field XML element to the form definition. | ||
|- | |- | ||
|public | |public | ||
− | |[[JForm::setFieldAttribute | + | |[[API17:JForm::setFieldAttribute|setFieldAttribute]] |
|Method to set an attribute value for a field XML element. | |Method to set an attribute value for a field XML element. | ||
|- | |- | ||
|public | |public | ||
− | |[[JForm::setFields | + | |[[API17:JForm::setFields|setFields]] |
|Method to set some field XML elements to the form definition. | |Method to set some field XML elements to the form definition. | ||
|- | |- | ||
|public | |public | ||
− | |[[JForm::setValue | + | |[[API17:JForm::setValue|setValue]] |
|Method to set the value of a field. | |Method to set the value of a field. | ||
|- | |- | ||
|public | |public | ||
− | |[[JForm::validate | + | |[[API17:JForm::validate|validate]] |
|Method to validate form data. | |Method to validate form data. | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JForm::addFieldPath | + | |[[API17:JForm::addFieldPath|addFieldPath]] |
|Proxy for . | |Proxy for . | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JForm::addFormPath | + | |[[API17:JForm::addFormPath|addFormPath]] |
|Proxy for . | |Proxy for . | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JForm::addRulePath | + | |[[API17:JForm::addRulePath|addRulePath]] |
|Proxy for . | |Proxy for . | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JForm::getInstance | + | |[[API17:JForm::getInstance|getInstance]] |
|Method to get an instance of a form. | |Method to get an instance of a form. | ||
|- | |- | ||
|protected | |protected | ||
− | |[[JForm::bindLevel | + | |[[API17:JForm::bindLevel|bindLevel]] |
|Method to bind data to the form for the group level. | |Method to bind data to the form for the group level. | ||
|- | |- | ||
|protected | |protected | ||
− | |[[JForm::filterField | + | |[[API17:JForm::filterField|filterField]] |
|Method to apply an input filter to a value based on field data. | |Method to apply an input filter to a value based on field data. | ||
|- | |- | ||
|protected | |protected | ||
− | |[[JForm::findField | + | |[[API17:JForm::findField|findField]] |
|Method to get a form field represented as an XML element object. | |Method to get a form field represented as an XML element object. | ||
|- | |- | ||
|protected | |protected | ||
− | |[[JForm::findFieldsByFieldset | + | |[[API17:JForm::findFieldsByFieldset|findFieldsByFieldset]] |
|Method to get an array of <field> elements from the form XML document which are in a specified fieldset by name. | |Method to get an array of <field> elements from the form XML document which are in a specified fieldset by name. | ||
|- | |- | ||
|protected | |protected | ||
− | |[[JForm::findFieldsByGroup | + | |[[API17:JForm::findFieldsByGroup|findFieldsByGroup]] |
|Method to get an array of <field> elements from the form XML document which are in a control group by name. | |Method to get an array of <field> elements from the form XML document which are in a control group by name. | ||
|- | |- | ||
|protected | |protected | ||
− | |[[JForm::findGroup | + | |[[API17:JForm::findGroup|findGroup]] |
|Method to get a form field group represented as an XML element object. | |Method to get a form field group represented as an XML element object. | ||
|- | |- | ||
|protected | |protected | ||
− | |[[JForm::loadField | + | |[[API17:JForm::loadField|loadField]] |
|Method to load, setup and return a object based on field data. | |Method to load, setup and return a object based on field data. | ||
|- | |- | ||
|protected | |protected | ||
− | |[[JForm::loadFieldType | + | |[[API17:JForm::loadFieldType|loadFieldType]] |
|Proxy for . | |Proxy for . | ||
|- | |- | ||
|protected | |protected | ||
− | |[[JForm::loadRuleType | + | |[[API17:JForm::loadRuleType|loadRuleType]] |
|Proxy for . | |Proxy for . | ||
|- | |- | ||
|protected | |protected | ||
− | |[[JForm::syncPaths | + | |[[API17:JForm::syncPaths|syncPaths]] |
|Method to synchronize any field, form or rule paths contained in the XML document. | |Method to synchronize any field, form or rule paths contained in the XML document. | ||
|- | |- | ||
|protected | |protected | ||
− | |[[JForm::validateField | + | |[[API17:JForm::validateField|validateField]] |
|Method to validate a object based on field data. | |Method to validate a object based on field data. | ||
|- | |- | ||
|protected static | |protected static | ||
− | |[[JForm::addNode | + | |[[API17:JForm::addNode|addNode]] |
|Adds a new child SimpleXMLElement node to the source. | |Adds a new child SimpleXMLElement node to the source. | ||
|- | |- | ||
|protected static | |protected static | ||
− | |[[JForm::mergeNode | + | |[[API17:JForm::mergeNode|mergeNode]] |
| | | | ||
|- | |- | ||
|protected static | |protected static | ||
− | |[[JForm::mergeNodes | + | |[[API17:JForm::mergeNodes|mergeNodes]] |
|Merges new elements into a source <fields> element. | |Merges new elements into a source <fields> element. | ||
|- | |- | ||
Line 187: | Line 187: | ||
===See also=== | ===See also=== | ||
* {{JVer|11.1}} '''JForm source code''' on [[jplatform:form/form.php|BitBucket]] | * {{JVer|11.1}} '''JForm source code''' on [[jplatform:form/form.php|BitBucket]] | ||
− | * {{JVer|11.1}} Subpackage [[Subpackage Form | + | * {{JVer|11.1}} Subpackage [[API17:Subpackage Form|Form]] |
− | * [[JForm|Other versions of JForm]] | + | * [[API17:JForm|Other versions of JForm]] |
{{SeeAlso:JForm}} | {{SeeAlso:JForm}} | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> |
Revision as of 20:42, 11 May 2013
The "API17" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
JForm[edit]
Description[edit]
Template:Description:JForm [Edit Descripton]
Methods[edit]
Visibility | Method name | Description |
---|---|---|
public | __construct | Method to instantiate the form object. |
public | bind | Method to bind data to the form. |
public | filter | Method to filter the form data. |
public | getErrors | Return all errors, if any. |
public | getField | Method to get a form field represented as a object. |
public | getFieldAttribute | Method to get an attribute value from a field XML element. |
public | getFieldset | Method to get an array of objects in a given fieldset by name. |
public | getFieldsets | Method to get an array of fieldset objects optionally filtered over a given field group. |
public | getFormControl | Method to get the form control. |
public | getGroup | Method to get an array of objects in a given field group by name. |
public | getInput | Method to get a form field markup for the field input. |
public | getLabel | Method to get a form field markup for the field input. |
public | getName | Method to get the form name. |
public | getValue | Method to get the value of a field. |
public | load | Method to load the form description from an XML string or object. |
public | loadFile | Method to load the form description from an XML file. |
public | removeField | Method to remove a field from the form definition. |
public | removeGroup | Method to remove a group from the form definition. |
public | reset | Method to reset the form data store and optionally the form XML definition. |
public | setField | Method to set a field XML element to the form definition. |
public | setFieldAttribute | Method to set an attribute value for a field XML element. |
public | setFields | Method to set some field XML elements to the form definition. |
public | setValue | Method to set the value of a field. |
public | validate | Method to validate form data. |
public static | addFieldPath | Proxy for . |
public static | addFormPath | Proxy for . |
public static | addRulePath | Proxy for . |
public static | getInstance | Method to get an instance of a form. |
protected | bindLevel | Method to bind data to the form for the group level. |
protected | filterField | Method to apply an input filter to a value based on field data. |
protected | findField | Method to get a form field represented as an XML element object. |
protected | findFieldsByFieldset | Method to get an array of <field> elements from the form XML document which are in a specified fieldset by name. |
protected | findFieldsByGroup | Method to get an array of <field> elements from the form XML document which are in a control group by name. |
protected | findGroup | Method to get a form field group represented as an XML element object. |
protected | loadField | Method to load, setup and return a object based on field data. |
protected | loadFieldType | Proxy for . |
protected | loadRuleType | Proxy for . |
protected | syncPaths | Method to synchronize any field, form or rule paths contained in the XML document. |
protected | validateField | Method to validate a object based on field data. |
protected static | addNode | Adds a new child SimpleXMLElement node to the source. |
protected static | mergeNode | |
protected static | mergeNodes | Merges new elements into a source <fields> element. |
- Defined in libraries/joomla/form/form.php
Importing[edit]
jimport( 'joomla.form.form' );
See also[edit]
- JForm source code on BitBucket
- Subpackage Form
- Other versions of JForm
Template:SeeAlso:JForm [Edit See Also]
User contributed notes[edit]
<CodeExamplesForm />