JForm::getInstance: Difference between revisions
From Joomla! Documentation
m clean up |
m preparing for archive only |
||
| Line 4: | Line 4: | ||
Method to get an instance of a form. | Method to get an instance of a form. | ||
<source lang="php"> | <source lang="php"> | ||
| Line 58: | Line 58: | ||
* {{JVer|11.1}} Subpackage [[API17:Subpackage_Form|Form]] | * {{JVer|11.1}} Subpackage [[API17:Subpackage_Form|Form]] | ||
* [[API17:JForm::getInstance|Other versions of JForm::getInstance]] | * [[API17:JForm::getInstance|Other versions of JForm::getInstance]] | ||
===User contributed notes=== | ===User contributed notes=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=JForm::getInstance | category=JForm::getInstance | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
Latest revision as of 03:04, 25 March 2017
JForm::getInstance
Description
Method to get an instance of a form.
public static function getInstance (
$name
$data=null
$options=array
$replace=true
$xpath=false
)
| Parameter | Type | Default | Description |
|---|---|---|---|
| $name | Exception | if an error occurs. | |
| $data | string | null | The name of an XML file or string to load as the form definition. |
| $options | array | array() | An array of form options. |
| $replace | string | true | Flag to toggle whether form fields should be replaced if a field already exists with the same group/name. |
| $xpath | string | false | An optional xpath to search for the fields. |
See also
JForm::getInstance source code on BitBucket
Class JForm
Subpackage Form- Other versions of JForm::getInstance
User contributed notes
Code Examples