Difference between revisions of "Folderlist form field type"

From Joomla! Documentation

(Created page for form field type)
 
(space deleted)
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
<noinclude><languages /></noinclude>
 +
<translate><!--T:1-->
 +
The '''folderlist''' form field type provides a drop down list of folders from a specfied directory. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.</translate>
 
[[Image:Params.folderlist.jpg|right]]
 
[[Image:Params.folderlist.jpg|right]]
 +
<translate><!--T:2-->
 +
By default, the first item on the list is '- Do not use -' (which is translatable) and is given the value '-1' and this is followed by '- Use default -' (also translatable) given the value '0'.</translate>
  
{{Ambox|type=notice|text=In Joomla! 1.5, [[Form field|form fields]] were [[Parameter|parameters]]. For that version, you may want to use the corresponding [[Folderlist parameter type]].}}
+
<translate><!--T:3-->
 +
* '''type''' (mandatory) must be '''folderlist'''.</translate>
 +
<translate><!--T:4-->
 +
* '''name''' (mandatory) is the unique name of the field.</translate>
 +
<translate><!--T:5-->
 +
* '''label''' (mandatory) (translatable) is the descriptive title of the field.</translate>
 +
<translate><!--T:6-->
 +
* '''directory''' (mandatory) is the filesystem path to the directory containing the folders to be listed.</translate>
 +
<translate><!--T:7-->
 +
* '''default''' (optional) is the default folder name.</translate>
 +
<translate><!--T:8-->
 +
* '''description''' (optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.</translate>
 +
<translate><!--T:9-->
 +
* '''filter''' (optional) is a regular expression string which is used to filter the list of folders selected for inclusion in the drop-down list. If omitted, all folders in the directory are included. The filter argument expression is applied before the exclude argument expression.  For information on constructing regular expressions see [[S:MyLanguage/Regular expressions in parameter arguments|Regular expressions in parameter arguments]].</translate>
 +
<translate><!--T:10-->
 +
* '''exclude''' (optional) is a regular expression string which is used to exclude folders from the list.  The exclude argument expression is applied after the filter argument expression.  For information on constructing regular expressions see [[S:MyLanguage/Regular expressions in parameter arguments|Regular expressions in parameter arguments]].</translate>
 +
<translate><!--T:11-->
 +
* '''hide_none''' (optional) is a Boolean argument. If true, the '- Do not use -' item is omitted from the drop-down list.</translate>
 +
<translate><!--T:12-->
 +
* '''hide_default''' (optional) is a Boolean argument. If true, the '- Use default -' item is omitted from the drop-down list.</translate>
  
The '''folderlist''' form field type provides a drop down list of folders from a specfied directory. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.
+
<translate><!--T:13-->
 +
Example XML field definition:</translate>
  
By default, the first item on the list is '- Do not use -' (which is translatable) and is given the value '-1' and this is followed by '- Use default -' (also translatable) given the value '0'.
 
 
* '''type''' (mandatory) must be '''folderlist'''.
 
* '''name''' (mandatory) is the unique name of the field.
 
* '''label''' (mandatory) (translatable) is the descriptive title of the field.
 
* '''directory''' (mandatory) is the filesystem path to the directory containing the folders to be listed.
 
* '''default''' (optional) is the default folder name.
 
* '''description''' (optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.
 
* '''filter''' (optional) is a regular expression string which is used to filter the list of folders selected for inclusion in the drop-down list. If omitted, all folders in the directory are included. The filter argument expression is applied before the exclude argument expression.  For information on constructing regular expressions see [[Regular expressions in parameter arguments]].
 
* '''exclude''' (optional) is a regular expression string which is used to exclude folders from the list.  The exclude argument expression is applied after the filter argument expression.  For information on constructing regular expressions see [[Regular expressions in parameter arguments]].
 
* '''hide_none''' (optional) is a Boolean argument. If true, the '- Do not use -' item is omitted from the drop-down list.
 
* '''hide_default''' (optional) is a Boolean argument. If true, the '- Use default -' item is omitted from the drop-down list.
 
 
Example XML field definition:
 
 
<source lang="xml"><field name="myfolder" type="folderlist" default="" label="Select a folder" directory="administrator" filter="" exclude="" stripext="" /></source>
 
<source lang="xml"><field name="myfolder" type="folderlist" default="" label="Select a folder" directory="administrator" filter="" exclude="" stripext="" /></source>
 
<noinclude>
 
<noinclude>
=== See also ===
+
<translate>
* [[Filelist form field type]]
+
=== See also === <!--T:14-->
* [[Imagelist form field type]]
+
</translate>
* [[Standard form field types|List of standard form field types]]
+
<translate>
[[Category:Standard form field types]]</noinclude>
+
<!--T:15-->
 +
* [[S:MyLanguage/Filelist form field type|Filelist form field type]]
 +
* [[S:MyLanguage/Imagelist form field type|Imagelist form field type]]
 +
* [[S:MyLanguage/Standard form field types|List of standard form field types]]
 +
</translate>
 +
 
 +
<noinclude><translate><!--T:16-->
 +
[[Category:Standard form field types]]</translate></noinclude>

Revision as of 10:27, 28 August 2015

Other languages:
English • ‎Nederlands • ‎español • ‎français

The folderlist form field type provides a drop down list of folders from a specfied directory. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.

Params.folderlist.jpg

By default, the first item on the list is '- Do not use -' (which is translatable) and is given the value '-1' and this is followed by '- Use default -' (also translatable) given the value '0'.

  • type (mandatory) must be folderlist.
  • name (mandatory) is the unique name of the field.
  • label (mandatory) (translatable) is the descriptive title of the field.
  • directory (mandatory) is the filesystem path to the directory containing the folders to be listed.
  • default (optional) is the default folder name.
  • description (optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.
  • filter (optional) is a regular expression string which is used to filter the list of folders selected for inclusion in the drop-down list. If omitted, all folders in the directory are included. The filter argument expression is applied before the exclude argument expression. For information on constructing regular expressions see Regular expressions in parameter arguments.
  • exclude (optional) is a regular expression string which is used to exclude folders from the list. The exclude argument expression is applied after the filter argument expression. For information on constructing regular expressions see Regular expressions in parameter arguments.
  • hide_none (optional) is a Boolean argument. If true, the '- Do not use -' item is omitted from the drop-down list.
  • hide_default (optional) is a Boolean argument. If true, the '- Use default -' item is omitted from the drop-down list.

Example XML field definition:

<field name="myfolder" type="folderlist" default="" label="Select a folder" directory="administrator" filter="" exclude="" stripext="" />

See also[edit]