Joomla filelist Form Field Type

The filelist form field provides a drop down list of files from a specified directory. The filelist 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'.

XML Field Definition

<field name="myfile"
 type="filelist"
 label="Select a file"
directory="images/myfiles" />

Additional Parameters

directory: It is the filesystem path to the directory containing the files to be listed. If omitted the directory given by the JPATH_ROOT is assumed.

fileFilter: This is a regular expression string used to filter the list of files selected for inclusion in the drop-down list. If omitted, all files in the directory are included. The filter argument expression is applied before the exclude argument expression.

exclude: It is a regular expression string which is used to exclude files from the list. The exclude argument expression is applied after the filter argument expression.

stripext: If true, then file name extensions will be stripped from the file names listed. The file name will be saved without the extension too.

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.