Joomla folderlist Form Field Type

The folderlist form field type provides a drop down list of folders from a specified directory. The folderlist field extends the list type field.

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'.

Example XML field definition:

<field name="myfolder"
type="folderlist"
default=""
label="Select a folder"
directory="images/myfolders" />

Additional Parameters

directory: This is the filesystem path to the directory containing the folders to be listed.

folderFilter: This 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.

exclude: This 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.

hide_none: If true, the '- None selected -' item is omitted from the drop-down list.

hide_default: If true, the '- Use default -' item is omitted from the drop-down list.

recursive: If true, the list of folders recursively includes any sub-folders found. If you have a large number of sub-folders this can make page loading slow.