select files, generated dynamic file selector
selectFile
This control reads the contents of a directory and creates a select
of the items found. Some examples:
- Directory tree containing only files, with relative paths:
- Directory tree containing only files, with absolute paths:
- Directory tree containing only directories, with relative paths:
- Live examples:
- Definition:
<?php $config = Array( 'id' => Array( 'type' => 'selectFile', 'displayname' => 'Please select a file', 'directory' => '/home/www/www.example.com/files/', 'tree' => '1 | 0', // default: 1 'includedirs' => '1 | 0', // default: 0 'includefiles' => '1 | 0', // default: 1 'exclude' => Array( 'autoexec.bat', 'config.sys' ), 'fullpath' => '1 | 0', // default: 0 'fullpathvalue' => '1 | 0', // default: 0 'trailingslash' => '1 | 0', // default: 1 'values' => Array( '/home/www/www.example.com/ => 'Your home directory', ), 'value' => '/home/www/www.example.com/', 'html' => 'CLASS="inputfieldstyle"' ) ); ?> - Possible validators:
- 'required'
- 'custom'
