HTMLForm_Controls
[ class tree: HTMLForm_Controls ] [ index: HTMLForm_Controls ] [ all elements ]

Class: HTMLForm_file

Source Location: /includes/class.htmlform_file.php

Class Overview

xss_clean
   |
   --HTMLForm_control
      |
      --HTMLForm_file

Class for file upload controls


Author(s):

Copyright:

  • (c) 2006 - 2008 Stefan Gabos

Methods


Inherited Variables

Inherited Methods

Class: HTMLForm_control

HTMLForm_control::disable_xss_filters()
Disables XSS filtering for the value of the control
HTMLForm_control::getAttributes()
Returns the values of requested HTML attributes of the control
HTMLForm_control::setAttributes()
Sets one or more HTML attributes of the control
HTMLForm_control::setRule()
Sets validation rules for the control

Class Details

[line 10]
Class for file upload controls



Tags:

copyright:  (c) 2006 - 2008 Stefan Gabos
author:  Stefan Gabos <ix@nivelzero.ro>


[ Top ]


Class Methods


constructor HTMLForm_file [line 54]

void HTMLForm_file( string $controlID, [array $attributes = ''])

Inserts an HTML <input type="file"> control in the form

Do not instantiate this class directly!

Use HTMLForm::add() method instead!

  1.   /*
  2.   notice the use of the "&" symbol -> it's the way we can have a reference to the object in PHP4
  3.   */
  4.  
  5.   $obj $form->add('file''control_id');




Parameters:

string   $controlID  

Unique name to identify the control in form.

Note that control's ID attribute will be, by default, the same as the name attribute! This means that this will be the name you will be using to refer to the control in the POST/GET superglobals, after the form has been submitted


array   $attributes  

(Optional) an array of user specified HTML attributes valid for an <input type="file>" control

Must be specified as an associative array of type attributeName => attributeValue

See HTMLForm_control::setAttributes() method to see how to set HTML attributes, other than through the class' constructor

Note that the following properties are automatically set and should not be altered manually:

type, id, name, class, onfocus, onblur

If you don't use templates for the form's output but rather let the script automatically generate it for you, you may use a special attribute called "nobr" (used like "nobr" => true) which will instruct the script to not start a new line after the control having this attribute set, but place the next control on the same line



[ Top ]


Documentation generated on Mon, 22 Sep 2008 11:03:16 +0300 by phpDocumentor 1.3.0RC6