Class HTML_Form

Description

Class contains contains class for creating forms It is taken from the PEAR library, and redefined to the coscms purpose.

I have left the orginal documentation where we have not changed anything.

Located in /lib/form.php (line 24)


	
			
Variable Summary
string $action
string $attr
string $enctype
array $fields
string $method
string $name
string $target
Method Summary
static void displayBlank ()
static void displayBlankRow (int $i, [string $title = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
static void displayCheckbox (string $name, [bool $default = false], [string $attr = ''])
static void displayCheckboxRow (string $name, string $title, [bool $default = false], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
static void displayFile (string $name, [int $maxsize = HTML_FORM_MAX_FILE_SIZE], [int $size = HTML_FORM_TEXT_SIZE], [string $accept = ''], [string $attr = ''])
static void displayFileRow (string $name, string $title, [int $maxsize = HTML_FORM_MAX_FILE_SIZE], [int $size = HTML_FORM_TEXT_SIZE], [string $accept = ''], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
static void displayHidden (string $name, string $value, [string $attr = ''])
static void displayImage (string $name, string $src, [string $attr = ''])
static void displayImageRow (string $name, string $title, string $src, [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
static void displayPassword (string $name, [mixed $default = null], [int $size = HTML_FORM_PASSWD_SIZE], [int $maxlength = 0], [string $attr = ''])
static void displayPasswordOneRow (string $name, string $title, [mixed $default = null], [int $size = HTML_FORM_PASSWD_SIZE], [int $maxlength = 0], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
static void displayPasswordRow (string $name, string $title, [mixed $default = null], [int $size = HTML_FORM_PASSWD_SIZE], [int $maxlength = 0], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
static void displayPlaintext ([string $text = ' '])
static void displayPlaintextRow (string $title, [string $text = ' '], [string $thattr = 'align="right valign="top""'], [string $tdattr = HTML_FORM_TD_ATTR])
static void displayRadio (string $name, string $value, [bool $default = false], [string $attr = ''])
static void displayRadioRow (string $name, string $title, string $value, [bool $default = false], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
static void displayReset ([string $title = 'Clear contents'], [string $attr = ''])
static void displayResetRow ([string $title = 'Clear contents'], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
static void displaySelect (string $name, array $entries, [mixed $default = null], [int $size = 1], [string $blank = ''], [bool $multiple = false], [string $attr = ''])
static void displaySelectRow (string $name, string $title, array $entries, [mixed $default = null], [int $size = 1], [string $blank = ''], [bool $multiple = false], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
static void displaySubmit ([string $title = 'Submit Changes'], [string $name = 'submit'], [string $attr = ''])
static void displaySubmitRow ([string $name = 'submit'], [string $title = 'Submit Changes'], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
static void displayText (string $name, [mixed $default = null], [int $size = HTML_FORM_TEXT_SIZE], [int $maxlength = 0], [string $attr = ''])
static void displayTextarea (string $name, [mixed $default = null], [int $width = 40], [int $height = 5], [int $maxlength = ''], [string $attr = ''])
static void displayTextareaRow (string $name, string $title, [mixed $default = null], [int $width = 40], [int $height = 5], [int $maxlength = 0], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
static void displayTextRow (string $name, string $title, [mixed $default = null], [int $size = HTML_FORM_TEXT_SIZE], [int $maxlength = 0], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
static string returnBlank ()
static string returnBlankRow (int $i, [string $title = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
static string returnCheckbox (string $name, [bool $default = false], [string $attr = ''])
static string returnCheckboxRow (string $name, string $title, [bool $default = false], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
static string returnDatepicker (string $name, [mixed $default = null], [int $size = HTML_FORM_TEXT_SIZE], [int $maxlength = 0], [string $attr = ''])
static string returnFile ([string $name = 'userfile'], [int $maxsize = HTML_FORM_MAX_FILE_SIZE], [int $size = HTML_FORM_TEXT_SIZE], [string $accept = ''], [string $attr = ''])
static string returnFileRow (string $name, string $title, [int $maxsize = HTML_FORM_MAX_FILE_SIZE], [int $size = HTML_FORM_TEXT_SIZE], [string $accept = ''], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
static string returnHidden (string $name, string $value, [string $attr = ''])
static string returnImage (string $name, string $src, [string $attr = ''])
static string returnImageRow (string $name, string $title, string $src, [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
static string returnMultipleFiles ([string $name = 'userfile[]'], [int $maxsize = HTML_FORM_MAX_FILE_SIZE], [int $files = 3], [int $size = HTML_FORM_TEXT_SIZE], [string $accept = ''], [string $attr = ''])
static string returnPassword (string $name, [mixed $default = null], [int $size = HTML_FORM_PASSWD_SIZE], [int $maxlength = 0], [string $attr = ''])
static string returnPasswordOneRow (string $name, string $title, [mixed $default = null], [int $size = HTML_FORM_PASSWD_SIZE], [int $maxlength = 0], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
static string returnPasswordRow (string $name, string $title, [mixed $default = null], [int $size = HTML_FORM_PASSWD_SIZE], [int $maxlength = 0], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
static string returnPlaintext ([string $text = ' '])
static string returnPlaintextRow (string $title, [string $text = ' '], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
static string returnRadio (string $name, string $value, [bool $default = false], [string $attr = ''])
static string returnRadioRow (string $name, string $title, string $value, [bool $default = false], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
static string returnReset ([string $title = 'Clear contents'], [string $attr = ''])
static string returnResetRow ([string $title = 'Clear contents'], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
static string returnSelect (string $name, array $entries, [mixed $default = null], [int $size = 1], [string $blank = ''], [bool $multiple = false], [string $attr = ''])
static string returnSelectRow (string $name, string $title, array $entries, [mixed $default = null], [int $size = 1], [string $blank = ''], [bool $multiple = false], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
static string returnSubmit ([string $title = 'Submit Changes'], [string $name = 'submit'], [string $attr = ''])
static string returnSubmitRow ([string $name = 'submit'], [string $title = 'Submit Changes'], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
static string returnText (string $name, [mixed $default = null], [int $size = HTML_FORM_TEXT_SIZE], [int $maxlength = 0], [string $attr = ''])
static string returnTextarea (string $name, [mixed $default = null], [int $width = 40], [int $height = 5], [int $maxlength = 0], [string $attr = ''])
static string returnTextareaRow (string $name, string $title, [mixed $default = null], [int $width = 40], [int $height = 5], [int $maxlength = 0], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
static string returnTextRow (string $name, string $title, [mixed $default = null], [int $size = HTML_FORM_TEXT_SIZE], [int $maxlength = 0], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
void HTML_Form (string $action, [string $method = 'get'], [string $name = ''], [string $target = ''], [string $enctype = ''], [string $attr = ''])
void addBlank (int $i, [string $title = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
void addCaptcha ( $name,  $title, [ $default = null], [ $size = HTML_FORM_TEXT_SIZE], [ $maxlength = 0], [ $attr = ''], [ $thattr = HTML_FORM_TH_ATTR], [ $tdattr = HTML_FORM_TD_ATTR])
void addCheckbox (string $name, string $title, [bool $default = false], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
void addDatepicker ( $name,  $title, [ $default = null], [ $size = HTML_FORM_TEXT_SIZE], [ $maxlength = 0], [ $attr = ''], [ $thattr = HTML_FORM_TH_ATTR], [ $tdattr = HTML_FORM_TD_ATTR])
void addFile (string $name, string $title, [int $maxsize = HTML_FORM_MAX_FILE_SIZE], [int $size = HTML_FORM_TEXT_SIZE], [string $accept = ''], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
void addHidden (string $name, string $value, [string $attr = ''])
void addImage (string $name, string $title, string $src, [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
void addPassword (string $name, string $title, [mixed $default = null], [int $size = HTML_FORM_PASSWD_SIZE], [int $maxlength = 0], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
void addPasswordOne (string $name, string $title, [mixed $default = null], [int $size = HTML_FORM_PASSWD_SIZE], [int $maxlength = 0], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
void addPlaintext (string $title, [string $text = ' '], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
void addRadio (string $name, string $title, string $value, [bool $default = false], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
void addReset ([string $title = 'Discard Changes'], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
void addSelect (string $name, string $title, array $entries, [mixed $default = null], [int $size = 1], [string $blank = ''], [bool $multiple = false], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
void addSubmit ([string $name = 'submit'], [string $title = 'Submit Changes'], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
void addText (string $name, string $title, [mixed $default = null], [int $size = HTML_FORM_TEXT_SIZE], [int $maxlength = 0], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
void addTextarea (string $name, string $title, [mixed $default = null], [int $width = HTML_FORM_TEXTAREA_WT], [int $height = HTML_FORM_TEXTAREA_HT], [int $maxlength = 0], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
void display ([string $attr = ''], [string $caption = ''], [string $capattr = ''])
void displayCaptcha ( $name, [ $default = null], [ $size = HTML_FORM_TEXT_SIZE], [ $maxlength = 0], [ $attr = ''])
void displayDatepicker ( $name, [ $default = null], [ $size = HTML_FORM_TEXT_SIZE], [ $maxlength = 0], [ $attr = ''])
void displayDatepickerRow ( $name,  $title, [ $default = null], [ $size = HTML_FORM_TEXT_SIZE], [ $maxlength = 0], [ $attr = ''], [ $thattr = HTML_FORM_TH_ATTR], [ $tdattr = HTML_FORM_TD_ATTR])
void end ()
void returnCaptcha ( $name, [ $default = null], [ $size = HTML_FORM_TEXT_SIZE], [ $maxlength = 0], [ $attr = ''])
void returnCaptchaRow ( $name,  $title, [ $default = null], [ $size = HTML_FORM_TEXT_SIZE], [ $maxlength = 0], [ $attr = ''], [ $thattr = HTML_FORM_TH_ATTR], [ $tdattr = HTML_FORM_TD_ATTR])
void returnDatepickerRow ( $name,  $title, [ $default = null], [ $size = HTML_FORM_TEXT_SIZE], [ $maxlength = 0], [ $attr = ''], [ $thattr = HTML_FORM_TH_ATTR], [ $tdattr = HTML_FORM_TD_ATTR])
string returnEnd ()
string returnStart ([bool $multipartformdata = false])
void setDefaultFromInput (boolean $bool)
void setEscapeDefaultFromInput (boolean $bool)
void start ([bool $multipartformdata = false])
Variables
string $action (line 32)

ACTION attribute of <form> tag

string $attr (line 75)

additional attributes for <form> tag

  • since: Property available since Release 1.1.0
string $enctype (line 67)

ENCTYPE attribute of <form> tag

array $fields (line 50)

an array of entries for this form

string $method (line 38)

METHOD attribute of <form> tag

string $name (line 44)

NAME attribute of <form> tag

mixed $storageObject (line 55)

DB_storage object, if tied to one

string $target (line 61)

TARGET attribute of <form> tag

Methods
static displayBlank (line 1336)

Prints &nbsp;

static void displayBlank ()
static displayBlankRow (line 1361)

Prints a blank row in the table

static void displayBlankRow (int $i, [string $title = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • int $i: the number of rows to create. Ignored if $title is used.
  • string $title: a string to be used as the label for the row
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
static displayCheckbox (line 901)

Prints a checkbox input

static void displayCheckbox (string $name, [bool $default = false], [string $attr = ''])
  • string $name: the string used in the 'name' attribute
  • bool $default: a bool indicating if item should be checked
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
static displayCheckboxRow (line 928)

Prints a checkbox input inside a table row

static void displayCheckboxRow (string $name, string $title, [bool $default = false], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • bool $default: a bool indicating if item should be checked
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
static displayFile (line 1388)

Prints a file upload input

static void displayFile (string $name, [int $maxsize = HTML_FORM_MAX_FILE_SIZE], [int $size = HTML_FORM_TEXT_SIZE], [string $accept = ''], [string $attr = ''])
  • string $name: the string used in the 'name' attribute
  • int $maxsize: an integer determining how large (in bytes) a submitted file can be.
  • int $size: an integer used in the 'size' attribute
  • string $accept: a string saying which MIME types are allowed
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
static displayFileRow (line 1421)

Prints a file upload input inside a table row

static void displayFileRow (string $name, string $title, [int $maxsize = HTML_FORM_MAX_FILE_SIZE], [int $size = HTML_FORM_TEXT_SIZE], [string $accept = ''], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • int $maxsize: an integer determining how large (in bytes) a submitted file can be.
  • int $size: an integer used in the 'size' attribute
  • string $accept: a string saying which MIME types are allowed
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
static displayHidden (line 1261)

Prints a hiden input

static void displayHidden (string $name, string $value, [string $attr = ''])
  • string $name: the string used in the 'name' attribute
  • string $value: the string used for the item's value
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
static displayImage (line 1208)

Prints an image input

static void displayImage (string $name, string $src, [string $attr = ''])
  • string $name: the string used in the 'name' attribute
  • string $src: the string denoting the path to the image. Can be a relative path or full URI.
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
static displayImageRow (line 1237)

Prints an image input inside a table row

static void displayImageRow (string $name, string $title, string $src, [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • string $src: the string denoting the path to the image. Can be a relative path or full URI.
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
static displayPassword (line 802)

Prints a password input

static void displayPassword (string $name, [mixed $default = null], [int $size = HTML_FORM_PASSWD_SIZE], [int $maxlength = 0], [string $attr = ''])
  • string $name: the string used in the 'name' attribute
  • mixed $default: a default value for the element
  • int $size: an integer used in the 'size' attribute
  • int $maxlength: an integer used in the 'maxlength' attribute
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
static displayPasswordOneRow (line 873)

Prints a password input inside a table row

static void displayPasswordOneRow (string $name, string $title, [mixed $default = null], [int $size = HTML_FORM_PASSWD_SIZE], [int $maxlength = 0], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • mixed $default: a default value for the element
  • int $size: an integer used in the 'size' attribute
  • int $maxlength: an integer used in the 'maxlength' attribute
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
static displayPasswordRow (line 836)

Prints a combined password input and password confirmation input inside a table row

static void displayPasswordRow (string $name, string $title, [mixed $default = null], [int $size = HTML_FORM_PASSWD_SIZE], [int $maxlength = 0], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • mixed $default: a default value for the element
  • int $size: an integer used in the 'size' attribute
  • int $maxlength: an integer used in the 'maxlength' attribute
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
static displayPlaintext (line 1445)

Prints the text provided

static void displayPlaintext ([string $text = '&nbsp;'])
  • string $text: a string to be displayed
static displayPlaintextRow (line 1469)

Prints the text provided inside a table row

static void displayPlaintextRow (string $title, [string $text = '&nbsp;'], [string $thattr = 'align="right valign="top""'], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $title: the string used as the label
  • string $text: a string to be displayed
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
static displayRadio (line 1287)

Prints a radio input

static void displayRadio (string $name, string $value, [bool $default = false], [string $attr = ''])
  • string $name: the string used in the 'name' attribute
  • string $value: the string used for the item's value
  • bool $default: a bool indicating if item should be checked
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
static displayRadioRow (line 1315)

Prints a radio input inside a table row

static void displayRadioRow (string $name, string $title, string $value, [bool $default = false], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • string $value: the string used for the item's value
  • bool $default: a bool indicating if item should be checked
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
static displayReset (line 1073)

Prints a reset button

NOTE: Unusual parameter order.

static void displayReset ([string $title = 'Clear contents'], [string $attr = ''])
  • string $title: a string that appears on the button
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
static displayResetRow (line 1100)

Prints a reset button inside a table row

NOTE: Unusual parameter order.

static void displayResetRow ([string $title = 'Clear contents'], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $title: a string that appears on the button
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
static displaySelect (line 1137)

Prints a select list

NOTE: In order for defaults to be automatically selected in the output, the PHP data types of the $default must match the data types of the keys in the $entries array.

static void displaySelect (string $name, array $entries, [mixed $default = null], [int $size = 1], [string $blank = ''], [bool $multiple = false], [string $attr = ''])
  • string $name: the string used in the 'name' attribute
  • array $entries: an array containing the <options> to be listed. The array's keys become the option values and the array's values become the visible text.
  • mixed $default: a default value for the element
  • int $size: an integer saying how many rows should be
  • string $blank: if this string is present, an <option> will be added to the top of the list that will contain the given text in the visible portion and an empty string as the value
  • bool $multiple: a bool saying if multiple choices are allowed
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
static displaySelectRow (line 1179)

Prints a select list inside a table row

NOTE: In order for defaults to be automatically selected in the output, the PHP data types of the $default must match the data types of the keys in the $entries array.

static void displaySelectRow (string $name, string $title, array $entries, [mixed $default = null], [int $size = 1], [string $blank = ''], [bool $multiple = false], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • array $entries: an array containing the <options> to be listed. The array's keys become the option values and the array's values become the visible text.
  • mixed $default: a default value for the element
  • int $size: an integer saying how many rows should be
  • string $blank: if this string is present, an <option> will be added to the top of the list that will contain the given text in the visible portion and an empty string as the value
  • bool $multiple: a bool saying if multiple choices are allowed
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
static displaySubmit (line 1021)

Prints a submit button

NOTE: Unusual parameter order.

static void displaySubmit ([string $title = 'Submit Changes'], [string $name = 'submit'], [string $attr = ''])
  • string $title: a string that appears on the button
  • string $name: a string used in the 'name' attribute
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
static displaySubmitRow (line 1048)

Prints a submit button inside a table row

static void displaySubmitRow ([string $name = 'submit'], [string $title = 'Submit Changes'], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: a string used in the 'name' attribute
  • string $title: a string that appears on the button
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
static displayText (line 719)

Prints a text input element

static void displayText (string $name, [mixed $default = null], [int $size = HTML_FORM_TEXT_SIZE], [int $maxlength = 0], [string $attr = ''])
  • string $name: the string used in the 'name' attribute
  • mixed $default: a default value for the element
  • int $size: an integer used in the 'size' attribute
  • int $maxlength: an integer used in the 'maxlength' attribute
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
static displayTextarea (line 958)

Prints a textarea input

static void displayTextarea (string $name, [mixed $default = null], [int $width = 40], [int $height = 5], [int $maxlength = ''], [string $attr = ''])
  • string $name: the string used in the 'name' attribute
  • mixed $default: a default value for the element
  • int $width: an integer saying how many characters wide the item should be
  • int $height: an integer saying how many rows tall the item should be
  • int $maxlength: an integer used in the 'maxlength' attribute
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
static displayTextareaRow (line 992)

Prints a textarea input inside a table row

static void displayTextareaRow (string $name, string $title, [mixed $default = null], [int $width = 40], [int $height = 5], [int $maxlength = 0], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • mixed $default: a default value for the element
  • int $width: an integer saying how many characters wide the item should be
  • int $height: an integer saying how many rows tall the item should be
  • int $maxlength: an integer used in the 'maxlength' attribute
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
static displayTextRow (line 764)

Prints a text input element inside a table row

static void displayTextRow (string $name, string $title, [mixed $default = null], [int $size = HTML_FORM_TEXT_SIZE], [int $maxlength = 0], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • mixed $default: a default value for the element
  • int $size: an integer used in the 'size' attribute
  • int $maxlength: an integer used in the 'maxlength' attribute
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
static returnBlank (line 2313)

Produce a string containing &nbsp;

static string returnBlank ()
static returnBlankRow (line 2339)

Produce a string containing a blank row in the table

static string returnBlankRow (int $i, [string $title = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • int $i: the number of rows to create. Ignored if $title is used.
  • string $title: a string to be used as the label for the row
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
static returnCheckbox (line 1771)

Produce a string containing a checkbox input

static string returnCheckbox (string $name, [bool $default = false], [string $attr = ''])
  • string $name: the string used in the 'name' attribute
  • bool $default: a bool indicating if item should be checked
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
static returnCheckboxRow (line 1802)

Produce a string containing a checkbox input inside a table row

static string returnCheckboxRow (string $name, string $title, [bool $default = false], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • bool $default: a bool indicating if item should be checked
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
static returnDatepicker (line 1539)

Produce a string containing a text input with a jquery datePicker

static string returnDatepicker (string $name, [mixed $default = null], [int $size = HTML_FORM_TEXT_SIZE], [int $maxlength = 0], [string $attr = ''])
  • string $name: the string used in the 'name' attribute
  • mixed $default: a default value for the element
  • int $size: an integer used in the 'size' attribute
  • int $maxlength: an integer used in the 'maxlength' attribute
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
static returnFile (line 2388)

Produce a string containing a file upload input

static string returnFile ([string $name = 'userfile'], [int $maxsize = HTML_FORM_MAX_FILE_SIZE], [int $size = HTML_FORM_TEXT_SIZE], [string $accept = ''], [string $attr = ''])
  • string $name: the string used in the 'name' attribute
  • int $maxsize: an integer determining how large (in bytes) a submitted file can be.
  • int $size: an integer used in the 'size' attribute
  • string $accept: a string saying which MIME types are allowed
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
static returnFileRow (line 2430)

Produce a string containing a file upload input inside a table row

static string returnFileRow (string $name, string $title, [int $maxsize = HTML_FORM_MAX_FILE_SIZE], [int $size = HTML_FORM_TEXT_SIZE], [string $accept = ''], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • int $maxsize: an integer determining how large (in bytes) a submitted file can be.
  • int $size: an integer used in the 'size' attribute
  • string $accept: a string saying which MIME types are allowed
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
static returnHidden (line 2293)

Produce a string containing a hiden input

static string returnHidden (string $name, string $value, [string $attr = ''])
  • string $name: the string used in the 'name' attribute
  • string $value: the string used for the item's value
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
static returnImage (line 2231)

Produce a string containing an image input

static string returnImage (string $name, string $src, [string $attr = ''])
  • string $name: the string used in the 'name' attribute
  • string $src: the string denoting the path to the image. Can be a relative path or full URI.
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
static returnImageRow (line 2261)

Produce a string containing an image input inside a table row

static string returnImageRow (string $name, string $title, string $src, [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • string $src: the string denoting the path to the image. Can be a relative path or full URI.
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
static returnMultipleFiles (line 2471)

Produce a string containing a file upload input

static string returnMultipleFiles ([string $name = 'userfile[]'], [int $maxsize = HTML_FORM_MAX_FILE_SIZE], [int $files = 3], [int $size = HTML_FORM_TEXT_SIZE], [string $accept = ''], [string $attr = ''])
  • string $name: the string used in the 'name' attribute
  • int $maxsize: an integer determining how large (in bytes) a submitted file can be.
  • int $files: an integer of how many file inputs to show
  • int $size: an integer used in the 'size' attribute
  • string $accept: a string saying which MIME types are allowed
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
static returnPassword (line 1649)

Produce a string containing a password input

static string returnPassword (string $name, [mixed $default = null], [int $size = HTML_FORM_PASSWD_SIZE], [int $maxlength = 0], [string $attr = ''])
  • string $name: the string used in the 'name' attribute
  • mixed $default: a default value for the element
  • int $size: an integer used in the 'size' attribute
  • int $maxlength: an integer used in the 'maxlength' attribute
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
static returnPasswordOneRow (line 1735)

Produce a string containing a password input inside a table row

static string returnPasswordOneRow (string $name, string $title, [mixed $default = null], [int $size = HTML_FORM_PASSWD_SIZE], [int $maxlength = 0], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • mixed $default: a default value for the element
  • int $size: an integer used in the 'size' attribute
  • int $maxlength: an integer used in the 'maxlength' attribute
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
static returnPasswordRow (line 1686)

Produce a string containing a combined password input and password confirmation input inside a table row

static string returnPasswordRow (string $name, string $title, [mixed $default = null], [int $size = HTML_FORM_PASSWD_SIZE], [int $maxlength = 0], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • mixed $default: a default value for the element
  • int $size: an integer used in the 'size' attribute
  • int $maxlength: an integer used in the 'maxlength' attribute
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
static returnPlaintext (line 2572)

Produce a string containing the text provided

static string returnPlaintext ([string $text = '&nbsp;'])
  • string $text: a string to be displayed
static returnPlaintextRow (line 2596)

Produce a string containing the text provided inside a table row

static string returnPlaintextRow (string $title, [string $text = '&nbsp;'], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $title: the string used as the label
  • string $text: a string to be displayed
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
static returnRadio (line 2164)

Produce a string containing a radio input

static string returnRadio (string $name, string $value, [bool $default = false], [string $attr = ''])
  • string $name: the string used in the 'name' attribute
  • string $value: the string used for the item's value
  • bool $default: a bool indicating if item should be checked
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
static returnRadioRow (line 2196)

Produce a string containing a radio input inside a table row

static string returnRadioRow (string $name, string $title, string $value, [bool $default = false], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • string $value: the string used for the item's value
  • bool $default: a bool indicating if item should be checked
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
static returnReset (line 1982)

Produce a string containing a reset button

NOTE: Unusual parameter order.

static string returnReset ([string $title = 'Clear contents'], [string $attr = ''])
  • string $title: a string that appears on the button
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
static returnResetRow (line 2010)

Produce a string containing a reset button inside a table row

NOTE: Unusual parameter order.

static string returnResetRow ([string $title = 'Clear contents'], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $title: a string that appears on the button
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
static returnSelect (line 2056)

Produce a string containing a select list

NOTE: In order for defaults to be automatically selected in the output, the PHP data types of the $default must match the data types of the keys in the $entries array.

static string returnSelect (string $name, array $entries, [mixed $default = null], [int $size = 1], [string $blank = ''], [bool $multiple = false], [string $attr = ''])
  • string $name: the string used in the 'name' attribute
  • array $entries: an array containing the <options> to be listed. The array's keys become the option values and the array's values become the visible text.
  • mixed $default: a default value for the element
  • int $size: an integer saying how many rows should be
  • string $blank: if this string is present, an <option> will be added to the top of the list that will contain the given text in the visible portion and an empty string as the value
  • bool $multiple: a bool saying if multiple choices are allowed
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
static returnSelectRow (line 2127)

Produce a string containing a select list inside a table row

NOTE: In order for defaults to be automatically selected in the output, the PHP data types of the $default must match the data types of the keys in the $entries array.

static string returnSelectRow (string $name, string $title, array $entries, [mixed $default = null], [int $size = 1], [string $blank = ''], [bool $multiple = false], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • array $entries: an array containing the <options> to be listed. The array's keys become the option values and the array's values become the visible text.
  • mixed $default: a default value for the element
  • int $size: an integer saying how many rows should be
  • string $blank: if this string is present, an <option> will be added to the top of the list that will contain the given text in the visible portion and an empty string as the value
  • bool $multiple: a bool saying if multiple choices are allowed
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
static returnSubmit (line 1920)

Produce a string containing a submit button

NOTE: Unusual parameter order.

static string returnSubmit ([string $title = 'Submit Changes'], [string $name = 'submit'], [string $attr = ''])
  • string $title: a string that appears on the button
  • string $name: a string used in the 'name' attribute
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
static returnSubmitRow (line 1948)

Produce a string containing a submit button inside a table row

static string returnSubmitRow ([string $name = 'submit'], [string $title = 'Submit Changes'], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: a string used in the 'name' attribute
  • string $title: a string that appears on the button
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
static returnText (line 1498)

Produce a string containing a text input

static string returnText (string $name, [mixed $default = null], [int $size = HTML_FORM_TEXT_SIZE], [int $maxlength = 0], [string $attr = ''])
  • string $name: the string used in the 'name' attribute
  • mixed $default: a default value for the element
  • int $size: an integer used in the 'size' attribute
  • int $maxlength: an integer used in the 'maxlength' attribute
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
static returnTextarea (line 1841)

Produce a string containing a textarea input

static string returnTextarea (string $name, [mixed $default = null], [int $width = 40], [int $height = 5], [int $maxlength = 0], [string $attr = ''])
  • string $name: the string used in the 'name' attribute
  • mixed $default: a default value for the element
  • int $width: an integer saying how many characters wide the item should be
  • int $height: an integer saying how many rows tall the item should be
  • int $maxlength: an integer used in the 'maxlength' attribute
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
static returnTextareaRow (line 1883)

Produce a string containing a textarea input inside a table row

static string returnTextareaRow (string $name, string $title, [mixed $default = null], [int $width = 40], [int $height = 5], [int $maxlength = 0], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • mixed $default: a default value for the element
  • int $width: an integer saying how many characters wide the item should be
  • int $height: an integer saying how many rows tall the item should be
  • int $maxlength: an integer used in the 'maxlength' attribute
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
static returnTextRow (line 1575)

Produce a string containing a text input inside a table row

static string returnTextRow (string $name, string $title, [mixed $default = null], [int $size = HTML_FORM_TEXT_SIZE], [int $maxlength = 0], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • mixed $default: a default value for the element
  • int $size: an integer used in the 'size' attribute
  • int $maxlength: an integer used in the 'maxlength' attribute
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
Constructor HTML_Form (line 145)

Constructor

  • access: public
void HTML_Form (string $action, [string $method = 'get'], [string $name = ''], [string $target = ''], [string $enctype = ''], [string $attr = ''])
  • string $action: the string naming file or URI to which the form should be submitted
  • string $method: a string indicating the submission method ('get' or 'post')
  • string $name: a string used in the <form>'s 'name' attribute
  • string $target: a string used in the <form>'s 'target' attribute
  • string $enctype: a string indicating the submission's encoding
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
addBlank (line 591)

Adds a blank row to the list of fields to be processed by display()

void addBlank (int $i, [string $title = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • int $i: the number of rows to create. Ignored if $title is used.
  • string $title: a string to be used as the label for the row
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
addCaptcha (line 229)
void addCaptcha ( $name,  $title, [ $default = null], [ $size = HTML_FORM_TEXT_SIZE], [ $maxlength = 0], [ $attr = ''], [ $thattr = HTML_FORM_TH_ATTR], [ $tdattr = HTML_FORM_TD_ATTR])
  • $name
  • $title
  • $default
  • $size
  • $maxlength
  • $attr
  • $thattr
  • $tdattr
addCheckbox (line 340)

Adds a checkbox input to the list of fields to be processed by display()

void addCheckbox (string $name, string $title, [bool $default = false], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • bool $default: a bool indicating if item should be checked
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
addDatepicker (line 238)
void addDatepicker ( $name,  $title, [ $default = null], [ $size = HTML_FORM_TEXT_SIZE], [ $maxlength = 0], [ $attr = ''], [ $thattr = HTML_FORM_TH_ATTR], [ $tdattr = HTML_FORM_TD_ATTR])
  • $name
  • $title
  • $default
  • $size
  • $maxlength
  • $attr
  • $thattr
  • $tdattr
addFile (line 623)

Adds a file upload input to the list of fields to be processed by display()

void addFile (string $name, string $title, [int $maxsize = HTML_FORM_MAX_FILE_SIZE], [int $size = HTML_FORM_TEXT_SIZE], [string $accept = ''], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • int $maxsize: an integer determining how large (in bytes) a submitted file can be.
  • int $size: an integer used in the 'size' attribute
  • string $accept: a string saying which MIME types are allowed
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
addHidden (line 566)

Adds a hiden input to the list of fields to be processed by display()

void addHidden (string $name, string $value, [string $attr = ''])
  • string $name: the string used in the 'name' attribute
  • string $value: the string used for the item's value
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
addImage (line 542)

Adds an image input to the list of fields to be processed by display()

void addImage (string $name, string $title, string $src, [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • string $src: the string denoting the path to the image. Can be a relative path or full URI.
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
addPassword (line 274)

Adds a combined password input and password confirmation input to the list of fields to be processed by display()

void addPassword (string $name, string $title, [mixed $default = null], [int $size = HTML_FORM_PASSWD_SIZE], [int $maxlength = 0], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • mixed $default: a default value for the element
  • int $size: an integer used in the 'size' attribute
  • int $maxlength: an integer used in the 'maxlength' attribute
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
addPasswordOne (line 309)

Adds a password input to the list of fields to be processed by display()

void addPasswordOne (string $name, string $title, [mixed $default = null], [int $size = HTML_FORM_PASSWD_SIZE], [int $maxlength = 0], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • mixed $default: a default value for the element
  • int $size: an integer used in the 'size' attribute
  • int $maxlength: an integer used in the 'maxlength' attribute
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
addPlaintext (line 652)

Adds a row of text to the list of fields to be processed by display()

void addPlaintext (string $title, [string $text = '&nbsp;'], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $title: the string used as the label
  • string $text: a string to be displayed
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
addRadio (line 511)

Adds a radio input to the list of fields to be processed by display()

void addRadio (string $name, string $title, string $value, [bool $default = false], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • string $value: the string used for the item's value
  • bool $default: a bool indicating if item should be checked
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
addReset (line 436)

Adds a reset button to the list of fields to be processed by display()

NOTE: Unusual parameter order.

void addReset ([string $title = 'Discard Changes'], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $title: a string that appears on the button
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
addSelect (line 478)

Adds a select list to the list of fields to be processed by display()

NOTE: In order for defaults to be automatically selected in the output, the PHP data types of the $default must match the data types of the keys in the $entries array.

void addSelect (string $name, string $title, array $entries, [mixed $default = null], [int $size = 1], [string $blank = ''], [bool $multiple = false], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • array $entries: an array containing the <options> to be listed. The array's keys become the option values and the array's values become the visible text.
  • mixed $default: a default value for the element
  • int $size: an integer saying how many rows should be
  • string $blank: if this string is present, an <option> will be added to the top of the list that will contain the given text in the visible portion and an empty string as the value
  • bool $multiple: a bool saying if multiple choices are allowed
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
addSubmit (line 406)

Adds a submit button to the list of fields to be processed by display()

void addSubmit ([string $name = 'submit'], [string $title = 'Submit Changes'], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: a string used in the 'name' attribute
  • string $title: a string that appears on the button
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
addText (line 220)

Adds a text input to the list of fields to be processed by display()

void addText (string $name, string $title, [mixed $default = null], [int $size = HTML_FORM_TEXT_SIZE], [int $maxlength = 0], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • mixed $default: a default value for the element
  • int $size: an integer used in the 'size' attribute
  • int $maxlength: an integer used in the 'maxlength' attribute
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
addTextarea (line 375)

Adds a textarea input to the list of fields to be processed by display()

void addTextarea (string $name, string $title, [mixed $default = null], [int $width = HTML_FORM_TEXTAREA_WT], [int $height = HTML_FORM_TEXTAREA_HT], [int $maxlength = 0], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])
  • string $name: the string used in the 'name' attribute
  • string $title: the string used as the label
  • mixed $default: a default value for the element
  • int $width: an integer saying how many characters wide the item should be
  • int $height: an integer saying how many rows tall the item should be
  • int $maxlength: an integer used in the 'maxlength' attribute
  • string $attr: a string of additional attributes to be put in the element (example: 'id="foo"')
  • string $thattr: a string of additional attributes to be put in the <th> element (example: 'class="foo"')
  • string $tdattr: a string of additional attributes to be put in the <td> element (example: 'class="foo"')
display (line 2644)

Prints a complete form with all fields you specified via the add*() methods

If you did not specify a field's default value (via the $default parameter to the add*() method in question), this method will automatically insert the user input found in $_GET/$_POST. This behavior can be disabled via setDefaultFromInput(false).

The $_GET/$_POST input is automatically escaped via htmlspecialchars(). This behavior can be disabled via setEscapeDefaultFromInput(false).

If the $_GET/$_POST superglobal doesn't exist, then $HTTP_GET_VARS/$HTTP_POST_VARS is used.

NOTE: can NOT be called statically.

void display ([string $attr = ''], [string $caption = ''], [string $capattr = ''])
  • string $attr: a string of additional attributes to be put in the <table> tag (example: 'class="foo"')
  • string $caption: if present, a <caption> is added to the table
  • string $capattr: a string of additional attributes to be put in the <caption> tag (example: 'class="foo"')
displayCaptcha (line 725)
void displayCaptcha ( $name, [ $default = null], [ $size = HTML_FORM_TEXT_SIZE], [ $maxlength = 0], [ $attr = ''])
  • $name
  • $default
  • $size
  • $maxlength
  • $attr
displayDatepicker (line 731)
void displayDatepicker ( $name, [ $default = null], [ $size = HTML_FORM_TEXT_SIZE], [ $maxlength = 0], [ $attr = ''])
  • $name
  • $default
  • $size
  • $maxlength
  • $attr
displayDatepickerRow (line 774)
void displayDatepickerRow ( $name,  $title, [ $default = null], [ $size = HTML_FORM_TEXT_SIZE], [ $maxlength = 0], [ $attr = ''], [ $thattr = HTML_FORM_TH_ATTR], [ $tdattr = HTML_FORM_TD_ATTR])
  • $name
  • $title
  • $default
  • $size
  • $maxlength
  • $attr
  • $thattr
  • $tdattr
end (line 695)

Prints the ending tags for the table and form

NOTE: can NOT be called statically.

void end ()
returnCaptcha (line 1509)
void returnCaptcha ( $name, [ $default = null], [ $size = HTML_FORM_TEXT_SIZE], [ $maxlength = 0], [ $attr = ''])
  • $name
  • $default
  • $size
  • $maxlength
  • $attr
returnCaptchaRow (line 1593)
void returnCaptchaRow ( $name,  $title, [ $default = null], [ $size = HTML_FORM_TEXT_SIZE], [ $maxlength = 0], [ $attr = ''], [ $thattr = HTML_FORM_TH_ATTR], [ $tdattr = HTML_FORM_TD_ATTR])
  • $name
  • $title
  • $default
  • $size
  • $maxlength
  • $attr
  • $thattr
  • $tdattr
returnDatepickerRow (line 1612)
void returnDatepickerRow ( $name,  $title, [ $default = null], [ $size = HTML_FORM_TEXT_SIZE], [ $maxlength = 0], [ $attr = ''], [ $thattr = HTML_FORM_TH_ATTR], [ $tdattr = HTML_FORM_TD_ATTR])
  • $name
  • $title
  • $default
  • $size
  • $maxlength
  • $attr
  • $thattr
  • $tdattr
returnEnd (line 2538)

Produces a string containing the opening tags for the form and table

NOTE: can NOT be called statically.

string returnEnd ()
returnStart (line 2506)

Produces a string containing the opening tags for the form and table

NOTE: can NOT be called statically.

string returnStart ([bool $multipartformdata = false])
  • bool $multipartformdata: a bool indicating if the form should be submitted in multipart format
setDefaultFromInput (line 171)

Enables/Disables $_GET/$_POST user input data showing up in fields when a $default hasn't been set

The default is TRUE.

void setDefaultFromInput (boolean $bool)
  • boolean $bool: TRUE to use $_GET/$_POST for the default, FALSE to default to an empty string
setEscapeDefaultFromInput (line 190)

Enables/Disables escaping of the $_GET/$_POST data that shows up in fields when a $default hasn't been set

The default is TRUE.

Uses htmlspecialchars() for the escaping.

void setEscapeDefaultFromInput (boolean $bool)
  • boolean $bool: TRUE to escape, FALSE to disable escaping
start (line 677)

Prints the opening tags for the form and table

NOTE: can NOT be called statically.

void start ([bool $multipartformdata = false])
  • bool $multipartformdata: a bool indicating if the form should be submitted in multipart format

Documentation generated on Fri, 17 Dec 2010 17:56:33 +0100 by phpDocumentor 1.4.3