fm_select_file
mixed fm_select_file ( string $message [, string $initial_folder_path [, string $file_type_list [, bool $allow_multiple_selections ]]] )
Description
Allows you to present a dialog asking the user to select a file (or multiple files) from disk.
Parameters
message
(required)
The message to be displayed in the dialog.
initial_folder_path
(optional)
The starting folder for the dialog.
file_type_list
(optional)
A comma separated list of file types that can be selected. For example, if you want someone to select a text file, use “txt”.
allow_multiple_selections
(optional)
A flag that allows multiple files to be selected instead of just one.
Return
Returns the path(s) to the selected file(s) or false if the user cancels. If multiple files are selected, a return delimited list is returned.
Errors
$path = fm_select_file('Please select a text file.', FM_DESKTOP_PATH, 'txt'); echo $path; /* Returns: /Users/Scodigo/Desktop/Test.txt */
Change Log
Version | Description |
---|---|
3.0.0 | Function now supports the selection of multiple files when the allow_multiple_selections parameter is set to true. |
3.0.0 | Function now returns error 315 when executed on FileMaker Server. |