Form field/ja

出典: Joomla! ドキュメンテーション

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.

Standard form field types

Numerous types of form field are built into Joomla!. The following table lists these standard types and their availability.


Joomla 1.5 Please note that many of these fields are available as parameter types in Joomla! 1.5. For a list of parameter types, see Standard parameter types. For a comparison between form field and parameter types, see Standard form field and parameter types.

Type Description Availability
accesslevel provides a drop down list of viewing access levels.

Joomla 1.6 and newer

cachehandler provides a list of available cache handling options.

Joomla 1.6 and newer

calendar provides a text box for entry of a date. An icon next to the text box provides a link to a pop-up calendar, which can also be used to enter the date value.

Joomla 1.6 and newer

category provides a drop down list of categories for an extension.

Joomla 1.6 and newer

checkbox provides a single checkbox to be checked or unchecked

Joomla 1.6 and newer

checkboxes provides unlimited checkboxes that can be used for multi-select.

Joomla 1.6 and newer

combo provides a combo box field.

Joomla 1.6 and newer

componentlayout provides a grouped list of core and template alternate layouts for a component item.

Joomla 1.6 and newer

contentlanguage provides a list of installed content languages for use in conjunction with the language switcher plugin.

Joomla 1.6 and newer

editor provides an editor area field.

Joomla 1.6 and newer

editors provides a drop down list of the available WYSIWYG editors.

Joomla 1.6 and newer

file

Joomla 1.6 and newer

filelist provides a drop down list of files from a specified directory.

Joomla 1.6 and newer

folderlist provides a drop down list of folders from a specified directory.

Joomla 1.6 and newer

groupedlist provides a drop down list of items organized into groups.

Joomla 1.6 and newer

helpsite provides a drop down list of the help sites for your Joomla installation.

Joomla 1.6 and newer

hidden provides a hidden field for saving a form field whose value cannot be altered directly by a user in the Administrator (it can be altered in code or by editing the params.ini file).

Joomla 1.6 and newer

imagelist provides a drop down list of image files in a specified directory.

Joomla 1.6 and newer

integer provides a drop down list of integers between a minimum and maximum.

Joomla 1.6 and newer

language provides a drop down list of the installed languages for the Front-end or Back-end.

Joomla 1.6 and newer

list provides a drop down list of custom-defined entries.

Joomla 1.6 and newer

media provides modal access to the media manager for insertion of images with upload for users with appropriate permissions.

Joomla 1.6 and newer

menu provides a drop down list of the available menus from your Joomla site.

Joomla 1.6 and newer

menuitem provides a drop down list of the available menu items from your Joomla site.

Joomla 1.6 and newer

modulelayout provides a list of alternative layout for a module grouped by core and template.

Joomla 1.6 and newer

password provides a text box for entry of a password. The password characters will be obscured as they are entered.

Joomla 1.6 and newer

radio provides radio buttons to select different options.

Joomla 1.6 and newer

rules provides a matrix of group by action options for managing access control. Display depends on context.

Joomla 1.6 and newer

sessionhandler provides a drop down list of session handler options.

Joomla 1.6 and newer

spacer provides a visual separator between form fields. It is purely a visual aid and no value is stored.

Joomla 1.6 and newer

sql provides a drop down list of entries obtained by running a query on the Joomla Database. The first results column returned by the query provides the values for the drop down box.

Joomla 1.6 and newer

templatestyle provides a drop down list of template styles.

Joomla 1.6 and newer

text provides a text box for data entry.

Joomla 1.6 and newer

textarea provides a text area for entry of multi-line text.

Joomla 1.6 and newer

timezone provides a drop down list of time zones.

Joomla 1.6 and newer

user provides a modal list of users.

Joomla 1.6 and newer

usergroup provides a drop down list of user groups.

Joomla 1.6 and newer