Actions

Difference between revisions of "Form field"

From Joomla! Documentation

(Created landing page)
 
(Made miscellaneous improvements)
Line 1: Line 1:
 
Form fields are fields in a HTML <code><form></code>. Joomla! 1.6 {{JVer|1.6}} and newer supply [[JForm|the JForm class]] to conveniently and flexibly create forms with a large amount of form fields. Each form field type is a subclass of [[JFormField]].
 
Form fields are fields in a HTML <code><form></code>. Joomla! 1.6 {{JVer|1.6}} and newer supply [[JForm|the JForm class]] to conveniently and flexibly create forms with a large amount of form fields. Each form field type is a subclass of [[JFormField]].
  
In addition to being a flexible page creation tool, JFormFields are used by Joomla! to allow [[Administrator (User)|administrators]] to configure Joomla! or its extensions without changing the underlying code. In Joomla! 1.5, this was handled by the now deprecated [[JParameter]] and [[JElement]] classes.
+
In addition to being a flexible page creation tool, JFormFields are used by Joomla! to allow [[Administrator (User)|administrators]] to configure Joomla! or its extensions without changing the underlying code. In Joomla! 1.5, this was handled by the now deprecated [[JParameter/1.5|JParameter]] and [[JElement/1.5|JElement]] classes.
 +
 
 +
To define form fields in the configuration of an extension, you must include them into the <code><fields name="params"></code> section of the <code><config></code> element in your [[Manifest files|XML manifest file]].
  
 
[[Category:Landing Pages]]
 
[[Category:Landing Pages]]

Revision as of 11:10, 20 May 2011

Form fields are fields in a HTML <form>. Joomla! 1.6 Joomla 1.6 and newer supply the JForm class to conveniently and flexibly create forms with a large amount of form fields. Each form field type is a subclass of JFormField.

In addition to being a flexible page creation tool, JFormFields are used by Joomla! to allow administrators to configure Joomla! or its extensions without changing the underlying code. In Joomla! 1.5, this was handled by the now deprecated JParameter and JElement classes.

To define form fields in the configuration of an extension, you must include them into the <fields name="params"> section of the <config> element in your XML manifest file.