API17

JForm::getInstance: Difference between revisions

From Joomla! Documentation

Doxiki2 (talk | contribs)
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.  


{{Description:JForm::getInstance}}
 
<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[Description:JForm::getInstance|Edit Descripton]]<nowiki>]</nowiki>
</span>
===Since===
{{JVer|11.1 }}
===Synopsis===
<source lang="php">
<source lang="php">
public static JForm::getInstance ($name, $data=null, $options=array(), $replace=true, $xpath=false)
public static function getInstance (
        $name
        $data=null
        $options=array
        $replace=true
        $xpath=false
)
</source>
</source>
{| class="wikitable"
{| class="wikitable"
Line 47: Line 48:
|-
|-
|}
|}
===Returns===
* '''Returns''' object  instance.
object  instance.
* '''Defined''' on line 1688 of libraries/joomla/form/form.php
===Defined in===
* '''Since''' {{JVer|11.1 }}
libraries/joomla/form/form.php
* '''Referenced by'''
===Referenced by===
** [[API17:JModelForm::loadForm|JModelForm::loadForm]]
* [[JModelForm/loadForm/11.1|JModelForm::loadForm]]
===See also===
===See also===
<span class="editsection" style="font-size:76%;">
* {{JVer|11.1}} '''JForm::getInstance source code''' on [[jplatform:form/form.php#cl-1680|BitBucket]]
<nowiki>[</nowiki>[[SeeAlso:JForm::getInstance|Edit See Also]]<nowiki>]</nowiki>
* {{JVer|11.1}} Class [[API17:JForm|JForm]]
</span>
* {{JVer|11.1}} Subpackage [[API17:Subpackage_Form|Form]]
* [[JForm/11.1|JForm]]
* [[API17:JForm::getInstance|Other versions of JForm::getInstance]]
* [[JForm::getInstance|Other versions of this method]]
 
{{SeeAlso:JForm::getInstance}}
 
===Examples===
===User contributed notes===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
noresultsheader=\n
noresultsheader=\n
category=JForm::getInstance
category=JForm::getInstance
category=CodeExample
namespace=CodeExample
category=MethodExample
category=MethodExample
include=*
include=*
namespace=CodeExample
format= ,,,
format= ,,,
</dpl>
</dpl>
<noinclude>[[Category:JForm]][[Category:JForm::getInstance]]</noinclude>
<noinclude>[[Category:Platform 11.1]][[Category:Archived pages API17]]</noinclude>

Latest revision as of 03:04, 25 March 2017

Joomla 11.1 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.
  • Returns object instance.
  • Defined on line 1688 of libraries/joomla/form/form.php
  • Since Joomla 11.1
  • Referenced by

See also


User contributed notes

Code Examples