FileUploadFormThe FileUploadForm control class.
This control can be used to upload files to a folder on the server. Files are uploaded asynchronously, without reloading the page.
The control can be added to the page with the PHP and JavaScript add functions and can then be retrieved with Wigbi.getControl(id).
This control differs a bit from other controls, since it makes the form enable file handling. Thus, it is the only "official" control that uses the automated submit handling of the control base class. To make this work for AJAX added controls, the following must apply:
Note that the max file size is limited to the smallest value of the maxFileSize property or post_max_size in the php.ini file.
JAVASCRIPT ********************************
FileUploadForm : BaseControl
Properties:
Functions:
Events:
Override onPreSubmit to set what to do before the form is being submitted. If it returns false, the submit operation will abort.
Override onSubmit to set what to do when the submit operation has finished. By default, it does nothing.
Override onSubmitError to set what to do when a submit operation fails. By default, it alerts all errors in the error list.
LANGUAGE HANDLING *************************
The following language parameters are used by the class:
Located in /wigbi_controls/FileUploadForm.php (line 125)
BaseControl | --FileUploadForm
static void
add
(string $controlId, string $uploadFolder, [string $fileTag = ""], [int $numUploads = 1], [int $maxFileSize = 100000000])
static add (line 346)
Add a FileUploadForm control to the page.
static upload (line 411)
Upload files to the server.
Constructor __construct (line 136)
Create an instance of the control.
This constructor is only to be used by Wigbi at startup.
submit (line 388)
The main submit function.
Inherited From BaseControl
BaseControl::__construct()
BaseControl::closeForm()
BaseControl::controlId()
BaseControl::isPostBackSource()
BaseControl::javaScript()
BaseControl::openForm()
BaseControl::registerJavaScript()
BaseControl::submit()
Documentation generated on Sun, 27 Dec 2009 20:12:01 +0100 by phpDocumentor 1.4.1