Class form_fileuploadfield

Description

File Upload Field class A field for uploading files to the webserver. If used with a 'form' object, the form will be automatically rendered with the proper encoding type by setting the 'enctype' in the form tag.

Example: $upField = new form_fileuploadfield("userfile", "Upload file", "", 500000); $upform = new form("upload_frm", "File Upload", "upload.php"); $upform->add($upField); $upform->add_button(new submit_button("Upload", "Upload")); echo $upform->render();

Located in /form-defs.php (line 1154)

RenderableObject
   |
   --StylableObject
      |
      --HTMLObject
         |
         --form_field
            |
            --form_fileuploadfield
Variable Summary
Method Summary
 form_fileuploadfield form_fileuploadfield ([string $name = ""], [string $label = ""], [string $value = ""], [integer $maxsize = 16384], [boolean $incl_maxsize = false])
 string html ([mixed $name = ""])
Variables
Methods
Constructor form_fileuploadfield (line 1171)

Constructor Create a field object. Sets basic field attributes.

form_fileuploadfield form_fileuploadfield ([string $name = ""], [string $label = ""], [string $value = ""], [integer $maxsize = 16384], [boolean $incl_maxsize = false])
  • string $name: The name of the field
  • string $label: The label which can be displayed alongside the field
  • string $value: The value of the field, ie. the filename/path
  • integer $maxsize: Maximum size of upload file in bytes
  • boolean $incl_maxsize: True if we include the MAX_FILE_SIZE hidden field when rendering
html (line 1182)

This renders the field as HTML.

  • return: The field as HTML.
string html ([mixed $name = ""])

Redefinition of:
RenderableObject::html()
Return output suitable for normal HTML-capable device. This method must be over-ridden by a method of the same name in the descendant class which renders output to web browsers.

Inherited Methods

Inherited From form_field

 form_field::form_field()
 form_field::as_displayonly()
 form_field::as_hiddenfield()
 form_field::disable_autocomplete()
 form_field::setlabel()
 form_field::setvalue()
 form_field::set_displayonly()

Inherited From HTMLObject

 HTMLObject::HTMLObject()
 HTMLObject::inherit_attributes()
 HTMLObject::setaccesskey()
 HTMLObject::setalign()
 HTMLObject::setalt()
 HTMLObject::setbackground()
 HTMLObject::setbgcolor()
 HTMLObject::setborder()
 HTMLObject::setcolor()
 HTMLObject::setheight()
 HTMLObject::sethspace()
 HTMLObject::setlang()
 HTMLObject::setlangdir()
 HTMLObject::setname()
 HTMLObject::setsize()
 HTMLObject::setsrc()
 HTMLObject::settabindex()
 HTMLObject::settarget()
 HTMLObject::settitle()
 HTMLObject::setvalign()
 HTMLObject::setvspace()
 HTMLObject::setwidth()
 HTMLObject::set_attribute()
 HTMLObject::set_linkover_text()
 HTMLObject::set_onblur()
 HTMLObject::set_onchange()
 HTMLObject::set_onclick()
 HTMLObject::set_ondblclick()
 HTMLObject::set_onfocus()
 HTMLObject::set_onkeydown()
 HTMLObject::set_onkeypress()
 HTMLObject::set_onkeyup()
 HTMLObject::set_onload()
 HTMLObject::set_onmousedown()
 HTMLObject::set_onmousemove()
 HTMLObject::set_onmouseout()
 HTMLObject::set_onmouseover()
 HTMLObject::set_onmouseup()
 HTMLObject::set_onselect()
 HTMLObject::set_tabindex()
 HTMLObject::taghtml()

Inherited From StylableObject

 StylableObject::StylableObject()
 StylableObject::clearstyle()
 StylableObject::setclass()
 StylableObject::setcss()
 StylableObject::setid()
 StylableObject::setstyle()

Inherited From RenderableObject

 RenderableObject::RenderableObject()
 RenderableObject::html()
 RenderableObject::render()
 RenderableObject::wml()
 RenderableObject::wmlup()
 RenderableObject::xml()

Documentation generated by phpDocumentor 1.3.0RC3