Difference between revisions of "Templatestyle form field type"

From Joomla! Documentation

m (Fix syntax error and add highlighting)
(Added deprecation notice and link to Joomla Manual)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
<noinclude><languages /></noinclude>
 
<noinclude><languages /></noinclude>
 +
{{Warning|This page has been superseded and is no longer maintained. Please go to [https://manual.joomla.org/docs/general-concepts/forms-fields/standard-fields/templatestyle Joomla Manual Templatestyle Field] instead}}
 +
 
<translate><!--T:1-->
 
<translate><!--T:1-->
 
Provides a dropdown list of style options.</translate>
 
Provides a dropdown list of style options.</translate>
Line 15: Line 17:
 
<translate><!--T:7-->
 
<translate><!--T:7-->
 
* '''class''' (optional) for styling.</translate>
 
* '''class''' (optional) for styling.</translate>
 +
* '''multiple''' <translate>(optional) is whether multiple items can be selected at the same time (''true'' or ''false''). In Joomla 4 it is recommended to use additionally <code>layout="joomla.form.field.groupedlist-fancy-select"</code> in the field declaration (= <code>chosen</code> replacement).</translate>
  
 
<translate><!--T:8-->
 
<translate><!--T:8-->

Latest revision as of 15:37, 16 July 2024

Other languages:
Deutsch • ‎English • ‎Nederlands • ‎español • ‎français
Stop hand nuvola.svg.png
Warning!

This page has been superseded and is no longer maintained. Please go to Joomla Manual Templatestyle Field instead


Provides a dropdown list of style options.

  • name (mandatory) is the unique name of the parameter.
  • type (mandatory) must be templatestyle.
  • client (optional) administrator, defaults to site.
  • label (mandatory) (translatable) is the descriptive title of the field.
  • description description text for the form field.
  • class (optional) for styling.
  • multiple (optional) is whether multiple items can be selected at the same time (true or false). In Joomla 4 it is recommended to use additionally layout="joomla.form.field.groupedlist-fancy-select" in the field declaration (= chosen replacement).

Example XML Definition :

<field name="admin_style" type="templatestyle"
	client="administrator"
	description="COM_ADMIN_USER_FIELD_BACKEND_TEMPLATE_DESC"
	label="COM_ADMIN_USER_FIELD_BACKEND_TEMPLATE_LABEL" >
		<option value="">JOPTION_USE_DEFAULT</option>
</field>