JFormFieldSubform

Extends \JFormField

The Field to load the form inside current form

Example

with all attributes: <field name="field-name" type="subform" formsource="path/to/form.xml" min="1" max="3" multiple="true" buttons="add,remove,move" layout="joomla.form.field.subform.repeatable-table" groupByFieldset="false" component="com_example" client="site" label="Field Label" description="Field Description" />

since

3.6

package

Joomla.Platform

Methods

__get

Method to get certain otherwise inaccessible properties from the form field object.

__get(string $name) : mixed
since

3.6

Arguments

$name

stringThe property name for which to get the value.

Response

mixedThe property value or null.

__set

Method to set certain otherwise inaccessible properties of the form field object.

__set(string $name, mixed $value) : void
since

3.6

Arguments

$name

stringThe property name for which to set the value.

$value

mixedThe value of the property.

getInput

Method to get the field input markup.

getInput() : string
since

3.6

Response

stringThe field input markup.

getName

Method to get the name used for the field input tag.

getName(string $fieldName) : string
since

3.6

Arguments

$fieldName

stringThe field element name.

Response

stringThe name to be used for the field input tag.

setup

Method to attach a JForm object to the field.

setup(\SimpleXMLElement $element, mixed $value, string $group = null) : boolean
since

3.6

Arguments

$element

\SimpleXMLElementThe SimpleXMLElement object representing the tag for the form field object.

$value

mixedThe form field value to validate.

$group

stringThe field name group control value.

Response

booleanTrue on success.

Properties

type

The form field type.

Type(s)

string

formsource

Form source

Type(s)

string

min

Minimum items in repeat mode

Type(s)

integer

max

Maximum items in repeat mode

Type(s)

integer

layout

Layout to render the form

Type(s)

string

groupByFieldset

Whether group subform fields by it`s fieldset

Type(s)

boolean

buttons

Which buttons to show in miltiple mode

Type(s)

array