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

Class: HTML_Form

Source Location: /HTML_Form-1.2.0/HTML/Form.php

Class Overview


HTML form utility functions


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 1997-2004 The PHP Group

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 122]
HTML form utility functions


[ Top ]


Class Variables

$action =

[line 130]

ACTION attribute of <form> tag

Type:   string


[ Top ]

$attr =

[line 173]

additional attributes for <form> tag
  • Since: Property available since Release 1.1.0

Type:   string


[ Top ]

$enctype =

[line 165]

ENCTYPE attribute of <form> tag

Type:   string


[ Top ]

$fields =

[line 148]

an array of entries for this form

Type:   array


[ Top ]

$method =

[line 136]

METHOD attribute of <form> tag

Type:   string


[ Top ]

$name =

[line 142]

NAME attribute of <form> tag

Type:   string


[ Top ]

$storageObject =

[line 153]

DB_storage object, if tied to one

Type:   mixed


[ Top ]

$target =

[line 159]

TARGET attribute of <form> tag

Type:   string


[ Top ]



Method Detail

HTML_Form (Constructor)   [line 195]

void HTML_Form( string $action, [string $method = 'get'], [string $name = ''], [string $target = ''], [string $enctype = ''], [string $attr = ''])

Constructor
  • Access: public

Parameters:

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"')

[ Top ]

addBlank   [line 587]

void addBlank( int $i, [string $title = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])

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

Parameters:

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"')

[ Top ]

addCheckbox   [line 336]

void addCheckbox( string $name, string $title, [bool $default = false], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])

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

Parameters:

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"')

[ Top ]

addFile   [line 619]

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])

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

Parameters:

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"')

[ Top ]

addHidden   [line 562]

void addHidden( string $name, string $value, [string $attr = ''])

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

Parameters:

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"')

[ Top ]

addImage   [line 538]

void addImage( string $name, string $title, string $src, [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])

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

Parameters:

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"')

[ Top ]

addPassword   [line 270]

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])

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

Parameters:

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"')

[ Top ]

addPasswordOne   [line 305]

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])

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

Parameters:

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"')

[ Top ]

addPlaintext   [line 648]

void addPlaintext( string $title, [string $text = '&nbsp;'], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])

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

Parameters:

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"')

[ Top ]

addRadio   [line 507]

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])

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

Parameters:

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"')

[ Top ]

addReset   [line 432]

void addReset( [string $title = 'Discard Changes'], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])

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

NOTE: Unusual parameter order.


Parameters:

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"')

[ Top ]

addSelect   [line 474]

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])

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.


Parameters:

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"')

[ Top ]

addSubmit   [line 402]

void addSubmit( [string $name = 'submit'], [string $title = 'Submit Changes'], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])

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

Parameters:

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"')

[ Top ]

addText   [line 234]

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])

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

Parameters:

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"')

[ Top ]

addTextarea   [line 371]

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])

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

Parameters:

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"')

[ Top ]

display   [line 2486]

void display( [string $attr = ''], [string $caption = ''], [string $capattr = ''])

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

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

NOTE: can NOT be called statically.


Parameters:

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"')

[ Top ]

displayBlank   [line 1307]


displayBlankRow   [line 1332]

void displayBlankRow( int $i, [string $title = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])

Prints a blank row in the table

Parameters:

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"')

[ Top ]

displayCheckbox   [line 872]

void displayCheckbox( string $name, [bool $default = false], [string $attr = ''])

Prints a checkbox input

Parameters:

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"')

[ Top ]

displayCheckboxRow   [line 899]

void displayCheckboxRow( string $name, string $title, [bool $default = false], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])

Prints a checkbox input inside a table row

Parameters:

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"')

[ Top ]

displayFile   [line 1359]

void displayFile( string $name, [int $maxsize = HTML_FORM_MAX_FILE_SIZE], [int $size = HTML_FORM_TEXT_SIZE], [string $accept = ''], [string $attr = ''])

Prints a file upload input

Parameters:

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"')

[ Top ]

displayFileRow   [line 1392]

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])

Prints a file upload input inside a table row

Parameters:

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"')

[ Top ]

displayHidden   [line 1232]

void displayHidden( string $name, string $value, [string $attr = ''])

Prints a hiden input

Parameters:

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"')

[ Top ]

displayImage   [line 1179]

void displayImage( string $name, string $src, [string $attr = ''])

Prints an image input

Parameters:

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"')

[ Top ]

displayImageRow   [line 1208]

void displayImageRow( string $name, string $title, string $src, [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])

Prints an image input inside a table row

Parameters:

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"')

[ Top ]

displayPassword   [line 773]

void displayPassword( string $name, [mixed $default = null], [int $size = HTML_FORM_PASSWD_SIZE], [int $maxlength = 0], [string $attr = ''])

Prints a password input

Parameters:

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"')

[ Top ]

displayPasswordOneRow   [line 844]

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])

Prints a password input inside a table row

Parameters:

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"')

[ Top ]

displayPasswordRow   [line 807]

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])

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

Parameters:

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"')

[ Top ]

displayPlaintext   [line 1416]

void displayPlaintext( [string $text = '&nbsp;'])

Prints the text provided

Parameters:

string   $text   —  a string to be displayed

[ Top ]

displayPlaintextRow   [line 1440]

void displayPlaintextRow( string $title, [string $text = '&nbsp;'], [string $thattr = 'align="right valign="top""'], [string $tdattr = HTML_FORM_TD_ATTR])

Prints the text provided inside a table row

Parameters:

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"')

[ Top ]

displayRadio   [line 1258]

void displayRadio( string $name, string $value, [bool $default = false], [string $attr = ''])

Prints a radio input

Parameters:

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"')

[ Top ]

displayRadioRow   [line 1286]

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])

Prints a radio input inside a table row

Parameters:

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"')

[ Top ]

displayReset   [line 1044]

void displayReset( [string $title = 'Clear contents'], [string $attr = ''])

Prints a reset button

NOTE: Unusual parameter order.


Parameters:

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"')

[ Top ]

displayResetRow   [line 1071]

void displayResetRow( [string $title = 'Clear contents'], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])

Prints a reset button inside a table row

NOTE: Unusual parameter order.


Parameters:

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"')

[ Top ]

displaySelect   [line 1108]

void displaySelect( string $name, array $entries, [mixed $default = null], [int $size = 1], [string $blank = ''], [bool $multiple = false], [string $attr = ''])

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.


Parameters:

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"')

[ Top ]

displaySelectRow   [line 1150]

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])

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.


Parameters:

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"')

[ Top ]

displaySubmit   [line 992]

void displaySubmit( [string $title = 'Submit Changes'], [string $name = 'submit'], [string $attr = ''])

Prints a submit button

NOTE: Unusual parameter order.


Parameters:

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"')

[ Top ]

displaySubmitRow   [line 1019]

void displaySubmitRow( [string $name = 'submit'], [string $title = 'Submit Changes'], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])

Prints a submit button inside a table row

Parameters:

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"')

[ Top ]

displayText   [line 715]

void displayText( string $name, [mixed $default = null], [int $size = HTML_FORM_TEXT_SIZE], [int $maxlength = 0], [string $attr = ''])

Prints a text input element

Parameters:

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"')

[ Top ]

displayTextarea   [line 929]

void displayTextarea( string $name, [mixed $default = null], [int $width = 40], [int $height = 5], [int $maxlength = ''], [string $attr = ''])

Prints a textarea input

Parameters:

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"')

[ Top ]

displayTextareaRow   [line 963]

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])

Prints a textarea input inside a table row

Parameters:

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"')

[ Top ]

displayTextRow   [line 745]

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])

Prints a text input element inside a table row

Parameters:

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"')

[ Top ]

end   [line 691]

void end( )

Prints the ending tags for the table and form

NOTE: can NOT be called statically.


[ Top ]

returnBlank   [line 2179]

string returnBlank( )

Produce a string containing &nbsp;

[ Top ]

returnBlankRow   [line 2205]

string returnBlankRow( int $i, [string $title = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])

Produce a string containing a blank row in the table

Parameters:

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"')

[ Top ]

returnCheckbox   [line 1655]

string returnCheckbox( string $name, [bool $default = false], [string $attr = ''])

Produce a string containing a checkbox input

Parameters:

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"')

[ Top ]

returnCheckboxRow   [line 1686]

string returnCheckboxRow( string $name, string $title, [bool $default = false], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])

Produce a string containing a checkbox input inside a table row

Parameters:

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"')

[ Top ]

returnEnd   [line 2393]

string returnEnd( )

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

NOTE: can NOT be called statically.


[ Top ]

returnFile   [line 2246]

string returnFile( [string $name = 'userfile'], [int $maxsize = HTML_FORM_MAX_FILE_SIZE], [int $size = HTML_FORM_TEXT_SIZE], [string $accept = ''], [string $attr = ''])

Produce a string containing a file upload input

Parameters:

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"')

[ Top ]

returnFileRow   [line 2287]

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])

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

Parameters:

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"')

[ Top ]

returnHidden   [line 2159]

string returnHidden( string $name, string $value, [string $attr = ''])

Produce a string containing a hiden input

Parameters:

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"')

[ Top ]

returnImage   [line 2101]

string returnImage( string $name, string $src, [string $attr = ''])

Produce a string containing an image input

Parameters:

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"')

[ Top ]

returnImageRow   [line 2131]

string returnImageRow( string $name, string $title, string $src, [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])

Produce a string containing an image input inside a table row

Parameters:

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"')

[ Top ]

returnMultipleFiles   [line 2326]

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 = ''])

Produce a string containing a file upload input

Parameters:

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"')

[ Top ]

returnPassword   [line 1539]

string returnPassword( string $name, [mixed $default = null], [int $size = HTML_FORM_PASSWD_SIZE], [int $maxlength = 0], [string $attr = ''])

Produce a string containing a password input

Parameters:

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"')

[ Top ]

returnPasswordOneRow   [line 1621]

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])

Produce a string containing a password input inside a table row

Parameters:

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"')

[ Top ]

returnPasswordRow   [line 1576]

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])

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

Parameters:

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"')

[ Top ]

returnPlaintext   [line 2426]

string returnPlaintext( [string $text = '&nbsp;'])

Produce a string containing the text provided

Parameters:

string   $text   —  a string to be displayed

[ Top ]

returnPlaintextRow   [line 2450]

string returnPlaintextRow( string $title, [string $text = '&nbsp;'], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])

Produce a string containing the text provided inside a table row

Parameters:

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"')

[ Top ]

returnRadio   [line 2038]

string returnRadio( string $name, string $value, [bool $default = false], [string $attr = ''])

Produce a string containing a radio input

Parameters:

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"')

[ Top ]

returnRadioRow   [line 2070]

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])

Produce a string containing a radio input inside a table row

Parameters:

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"')

[ Top ]

returnReset   [line 1859]

string returnReset( [string $title = 'Clear contents'], [string $attr = ''])

Produce a string containing a reset button

NOTE: Unusual parameter order.


Parameters:

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"')

[ Top ]

returnResetRow   [line 1887]

string returnResetRow( [string $title = 'Clear contents'], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])

Produce a string containing a reset button inside a table row

NOTE: Unusual parameter order.


Parameters:

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"')

[ Top ]

returnSelect   [line 1931]

string returnSelect( string $name, array $entries, [mixed $default = null], [int $size = 1], [string $blank = ''], [bool $multiple = false], [string $attr = ''])

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.


Parameters:

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"')

[ Top ]

returnSelectRow   [line 2003]

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])

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.


Parameters:

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"')

[ Top ]

returnStart   [line 2361]

string returnStart( [bool $multipartformdata = false])

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

NOTE: can NOT be called statically.


Parameters:

bool   $multipartformdata   —  a bool indicating if the form should be submitted in multipart format

[ Top ]

returnSubmit   [line 1799]

string returnSubmit( [string $title = 'Submit Changes'], [string $name = 'submit'], [string $attr = ''])

Produce a string containing a submit button

NOTE: Unusual parameter order.


Parameters:

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"')

[ Top ]

returnSubmitRow   [line 1827]

string returnSubmitRow( [string $name = 'submit'], [string $title = 'Submit Changes'], [string $attr = ''], [string $thattr = HTML_FORM_TH_ATTR], [string $tdattr = HTML_FORM_TD_ATTR])

Produce a string containing a submit button inside a table row

Parameters:

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"')

[ Top ]

returnText   [line 1469]

string returnText( string $name, [mixed $default = null], [int $size = HTML_FORM_TEXT_SIZE], [int $maxlength = 0], [string $attr = ''])

Produce a string containing a text input

Parameters:

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"')

[ Top ]

returnTextarea   [line 1722]

string returnTextarea( string $name, [mixed $default = null], [int $width = 40], [int $height = 5], [int $maxlength = 0], [string $attr = ''])

Produce a string containing a textarea input

Parameters:

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"')

[ Top ]

returnTextareaRow   [line 1764]

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])

Produce a string containing a textarea input inside a table row

Parameters:

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"')

[ Top ]

returnTextRow   [line 1504]

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])

Produce a string containing a text input inside a table row

Parameters:

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"')

[ Top ]

start   [line 673]

void start( [bool $multipartformdata = false])

Prints the opening tags for the form and table

NOTE: can NOT be called statically.


Parameters:

bool   $multipartformdata   —  a bool indicating if the form should be submitted in multipart format

[ Top ]


Documentation generated on Wed, 09 Dec 2015 22:15:41 +0000 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.