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

Class: HTML_Form

Source Location: /HTML_Form-1.1.0RC1/HTML/Form.php

Class Overview


HTML form utility functions


Author(s):

Version:

  • $Id: Form.php,v 1.8 2004/06/14 03:18:18 danielc Exp $

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 57]
HTML form utility functions


[ Top ]


Class Variables

$action =

[line 65]

ACTION attribute of <form> tag

Type:   string


[ Top ]

$attr =

[line 108]

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

Type:   string


[ Top ]

$enctype =

[line 100]

ENCTYPE attribute of <form> tag

Type:   string


[ Top ]

$fields =

[line 83]

an array of entries for this form

Type:   array


[ Top ]

$method =

[line 71]

METHOD attribute of <form> tag

Type:   string


[ Top ]

$name =

[line 77]

NAME attribute of <form> tag

Type:   string


[ Top ]

$storageObject =

[line 88]

DB_storage object, if tied to one

Type:   mixed


[ Top ]

$target =

[line 94]

TARGET attribute of <form> tag

Type:   string


[ Top ]



Method Detail

HTML_Form (Constructor)   [line 130]

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

void addBlank( int $i, [string $title = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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

void addCheckbox( string $name, string $title, [bool $default = false], [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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

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 = 'align="right"'], [string $tdattr = ''])

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

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

void addImage( string $name, string $title, string $src, [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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

void addPassword( string $name, string $title, [mixed $default = ''], [int $size = HTML_FORM_PASSWD_SIZE], [int $maxlength = 0], [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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

void addPlaintext( string $title, [string $text = '&nbsp;'], [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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

addRadio   [line 394]

void addRadio( string $name, string $title, string $value, [bool $default = false], [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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

void addReset( [string $title = 'Discard Changes'], [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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

void addSelect( string $name, string $title, array $entries, [mixed $default = ''], [int $size = 1], [string $blank = ''], [bool $multiple = false], [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

Adds a select list 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
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 296]

void addSubmit( [string $name = 'submit'], [string $title = 'Submit Changes'], [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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

void addText( string $name, string $title, [mixed $default = ''], [int $size = HTML_FORM_TEXT_SIZE], [int $maxlength = 0], [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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

void addTextarea( string $name, string $title, [mixed $default = ''], [int $width = HTML_FORM_TEXTAREA_WT], [int $height = HTML_FORM_TEXTAREA_HT], [int $maxlength = 0], [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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

void display( )

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.


[ Top ]

displayBlank   [line 1136]


displayBlankRow   [line 1161]

void displayBlankRow( int $i, [string $title = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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

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

void displayCheckboxRow( string $name, string $title, [bool $default = false], [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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

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

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 = 'align="right"'], [string $tdattr = ''])

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

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

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

void displayImageRow( string $name, string $title, string $src, [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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

void displayPassword( string $name, [mixed $default = ''], [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 ]

displayPasswordRow   [line 689]

void displayPasswordRow( string $name, string $title, [mixed $default = ''], [int $size = HTML_FORM_PASSWD_SIZE], [int $maxlength = 0], [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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 ]

displayPlaintext   [line 1244]

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

Prints the text provided

Parameters:

string   $text   —  a string to be displayed

[ Top ]

displayPlaintextRow   [line 1270]

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

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

displayRadio   [line 1088]

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

void displayRadioRow( string $name, string $title, string $value, [bool $default = false], [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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

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

void displayResetRow( [string $title = 'Clear contents'], [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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

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

Prints a select list

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

void displaySelectRow( string $name, string $title, array $entries, [mixed $default = ''], [int $size = 1], [string $blank = ''], [bool $multiple = false], [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

Prints a select list inside a table row

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

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

void displaySubmitRow( [string $name = 'submit'], [string $title = 'Submit Changes'], [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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

void displayText( string $name, [mixed $default = ''], [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 772]

void displayTextarea( string $name, [mixed $default = ''], [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 806]

void displayTextareaRow( string $name, string $title, [mixed $default = ''], [int $width = 40], [int $height = 5], [int $maxlength = 0], [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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

void displayTextRow( string $name, string $title, [mixed $default = ''], [int $size = HTML_FORM_TEXT_SIZE], [int $maxlength = 0], [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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

void end( )

Prints the ending tags for the table and form

NOTE: can NOT be called statically.


[ Top ]

returnBlank   [line 1950]

string returnBlank( )

Produce a string containing &nbsp;

[ Top ]

returnBlankRow   [line 1976]

string returnBlankRow( int $i, [string $title = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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

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

string returnCheckboxRow( string $name, string $title, [bool $default = false], [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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

string returnEnd( )

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

NOTE: can NOT be called statically.


[ Top ]

returnFile   [line 2017]

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

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 = 'align="right"'], [string $tdattr = ''])

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

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

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

string returnImageRow( string $name, string $title, string $src, [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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

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

string returnPassword( string $name, [mixed $default = ''], [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 ]

returnPasswordRow   [line 1405]

string returnPasswordRow( string $name, string $title, [mixed $default = ''], [int $size = HTML_FORM_PASSWD_SIZE], [int $maxlength = 0], [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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 ]

returnPlaintext   [line 2195]

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

Produce a string containing the text provided

Parameters:

string   $text   —  a string to be displayed

[ Top ]

returnPlaintextRow   [line 2221]

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

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

returnRadio   [line 1811]

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

string returnRadioRow( string $name, string $title, string $value, [bool $default = false], [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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

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

string returnResetRow( [string $title = 'Clear contents'], [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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

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

Produce a string containing a select list

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

string returnSelectRow( string $name, string $title, array $entries, [mixed $default = ''], [int $size = 1], [string $blank = ''], [bool $multiple = false], [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

Produce a string containing a select list inside a table row

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

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

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

string returnSubmitRow( [string $name = 'submit'], [string $title = 'Submit Changes'], [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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

string returnText( string $name, [mixed $default = ''], [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 1507]

string returnTextarea( string $name, [mixed $default = ''], [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 1549]

string returnTextareaRow( string $name, string $title, [mixed $default = ''], [int $width = 40], [int $height = 5], [int $maxlength = 0], [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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

string returnTextRow( string $name, string $title, [mixed $default = ''], [int $size = HTML_FORM_TEXT_SIZE], [int $maxlength = 0], [string $attr = ''], [string $thattr = 'align="right"'], [string $tdattr = ''])

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

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 Mon, 11 Mar 2019 13:51:31 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.