Actions

Difference between revisions of "XML JForm form definitions"

From Joomla! Documentation

(Update from 1.6 to 2.5)
(Update from 1.6 to 2.5)
 
Line 1: Line 1:
Joomla! 1.6 {{JVer|2.5}} and newer supply the [[JForm]] class to conveniently and flexibly create forms with a large amount of form fields. [[JForm]] can create forms from XML form definitions. These can be standalone files or sections of other files, notably [[manifest files]].
+
Joomla! 2.5 {{JVer|2.5}} and newer supply the [[JForm]] class to conveniently and flexibly create forms with a large amount of form fields. [[JForm]] can create forms from XML form definitions. These can be standalone files or sections of other files, notably [[manifest files]].
  
 
== Syntax ==
 
== Syntax ==

Latest revision as of 17:57, 29 April 2013

Joomla! 2.5 Joomla 2.5 and newer supply the JForm class to conveniently and flexibly create forms with a large amount of form fields. JForm can create forms from XML form definitions. These can be standalone files or sections of other files, notably manifest files.

Syntax

The root element for JForm definitions is usually <config>. Under the <config> element, one or more <fieldset> elements may appear, each representing a HTML <fieldset>, a group of form fields visually grouped together. The optional name attribute can be used on the <fieldset> to define the name of the fieldset, as in <fieldset name="params">.

Each fieldset must contain one or more <field> elements, each representing a single form field with a label. See Standard form field types for a list of allowed form field types and example XML form field definitions.