API16

JForm/addField: Difference between revisions

From Joomla! Documentation

m removing red link to edit, no existant pages
m clean up
Line 2: Line 2:
Method to add a field to a group.
Method to add a field to a group.


<span class="editsection" style="font-size:76%;">
 
<nowiki>[<! removed edit link to red link >]</nowiki>
</span>


<! removed transcluded page call, red link never existed >
<! removed transcluded page call, red link never existed >
Line 43: Line 41:
</source>
</source>


<span class="editsection" style="font-size:76%;">
 
<nowiki>[<! removed edit link to red link >]</nowiki>
</span>
<! removed transcluded page call, red link never existed >
<! removed transcluded page call, red link never existed >



Revision as of 14:01, 24 March 2017

Description

Method to add a field to a group.


<! removed transcluded page call, red link never existed >

Syntax

addField(&$field, $group= '_default')
Parameter Name Default Value Description
&$field $field The field object to add.
$group '_default' $group The group to add the field to.

Returns

void

Defined in

libraries/joomla/form/form.php

Importing

jimport( 'joomla.form.form' );

Source Body

public function addField(&$field, $group = '_default')
{
        // Add the field to the group.
        $this->_groups[$group][(string)$field->attributes()->name] = &$field;
}


<! removed transcluded page call, red link never existed >

Examples

<CodeExamplesForm />