JForm::getInstance: Difference between revisions
From Joomla! Documentation
Bulk upload by Doxiki2 |
m preparing for archive only |
||
| (6 intermediate revisions by 2 users not shown) | |||
| 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"> | ||
public static | public static function getInstance ( | ||
$name | |||
$data=null | |||
$options=array | |||
$replace=true | |||
$xpath=false | |||
) | |||
</source> | </source> | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 47: | Line 48: | ||
|- | |- | ||
|} | |} | ||
* '''Returns''' object instance. | |||
object instance. | * '''Defined''' on line 1688 of libraries/joomla/form/form.php | ||
* '''Since''' {{JVer|11.1 }} | |||
libraries/joomla/form/form.php | * '''Referenced by''' | ||
** [[API17:JModelForm::loadForm|JModelForm::loadForm]] | |||
* [[JModelForm | |||
===See also=== | ===See also=== | ||
* {{JVer|11.1}} '''JForm::getInstance source code''' on [[jplatform:form/form.php#cl-1680|BitBucket]] | |||
* {{JVer|11.1}} Class [[API17:JForm|JForm]] | |||
* {{JVer|11.1}} Subpackage [[API17:Subpackage_Form|Form]] | |||
* | * [[API17:JForm::getInstance|Other versions of JForm::getInstance]] | ||
* [[JForm::getInstance|Other versions of | |||
===Examples=== | ===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=* | ||
namespace=CodeExample | |||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
<noinclude>[[Category: | <noinclude>[[Category:Platform 11.1]][[Category:Archived pages API17]]</noinclude> | ||
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