Class: HTML_Form
Source Location: /HTML_Form-1.3.1/HTML/Form.php
HTML form utility functions
Author(s):
Version:
- Release: @package_version@
Copyright:
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
Method Detail
HTML_Form (Constructor) [line 248]
void HTML_Form(
string
$action, [string
$method = 'get'], [string
$name = ''], [string
$target = ''], [string
$enctype = ''], [string
$attr = ''])
|
|
Constructor
Parameters:
addBlank [line 676]
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:
addCheckbox [line 425]
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:
addFile [line 708]
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:
addHidden [line 651]
void addHidden(
string
$name, string
$value, [string
$attr = ''])
|
|
Adds a hiden input to the list of fields to be processed by display()
Parameters:
addImage [line 627]
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:
addPassword [line 359]
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:
addPasswordOne [line 394]
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:
addPlaintext [line 737]
void addPlaintext(
string
$title, [string
$text = ' '], [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:
addRadio [line 596]
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:
addReset [line 521]
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:
addSelect [line 563]
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:
addSubmit [line 491]
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:
addText [line 323]
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:
addTextarea [line 460]
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:
display [line 2585]
void display(
[string
$attr = ''], [string
$caption = ''], [string
$capattr = ''])
|
|
Prints a complete form with all fields you specified via the add*() methods If you did not specify a field's default value (via the $default parameter to the add*() method in question), this method will automatically insert the user input found in $_GET/$_POST. This behavior can be disabled via setDefaultFromInput(false). The $_GET/$_POST input is automatically escaped via htmlspecialchars(). This behavior can be disabled via setEscapeDefaultFromInput(false). If the $_GET/$_POST superglobal doesn't exist, then $HTTP_GET_VARS/$HTTP_POST_VARS is used. NOTE: can NOT be called statically.
Parameters:
displayBlank [line 1396]
displayBlankRow [line 1421]
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:
displayCheckbox [line 961]
void displayCheckbox(
string
$name, [bool
$default = false], [string
$attr = ''])
|
|
Prints a checkbox input
Parameters:
displayCheckboxRow [line 988]
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:
displayFile [line 1448]
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:
displayFileRow [line 1481]
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:
displayHidden [line 1321]
void displayHidden(
string
$name, string
$value, [string
$attr = ''])
|
|
Prints a hiden input
Parameters:
displayImage [line 1268]
void displayImage(
string
$name, string
$src, [string
$attr = ''])
|
|
Prints an image input
Parameters:
displayImageRow [line 1297]
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:
displayPassword [line 862]
void displayPassword(
string
$name, [mixed
$default = null], [int
$size = HTML_FORM_PASSWD_SIZE], [int
$maxlength = 0], [string
$attr = ''])
|
|
Prints a password input
Parameters:
displayPasswordOneRow [line 933]
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:
displayPasswordRow [line 896]
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:
displayPlaintext [line 1505]
void displayPlaintext(
[string
$text = ' '])
|
|
Prints the text provided
Parameters:
displayPlaintextRow [line 1529]
void displayPlaintextRow(
string
$title, [string
$text = ' '], [string
$thattr = 'align="right valign="top""'], [string
$tdattr = HTML_FORM_TD_ATTR])
|
|
Prints the text provided inside a table row
Parameters:
displayRadio [line 1347]
void displayRadio(
string
$name, string
$value, [bool
$default = false], [string
$attr = ''])
|
|
Prints a radio input
Parameters:
displayRadioRow [line 1375]
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:
displayReset [line 1133]
void displayReset(
[string
$title = 'Clear contents'], [string
$attr = ''])
|
|
Prints a reset button NOTE: Unusual parameter order.
Parameters:
displayResetRow [line 1160]
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:
displaySelect [line 1197]
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:
displaySelectRow [line 1239]
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:
displaySubmit [line 1081]
void displaySubmit(
[string
$title = 'Submit Changes'], [string
$name = 'submit'], [string
$attr = ''])
|
|
Prints a submit button NOTE: Unusual parameter order.
Parameters:
displaySubmitRow [line 1108]
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:
displayText [line 804]
void displayText(
string
$name, [mixed
$default = null], [int
$size = HTML_FORM_TEXT_SIZE], [int
$maxlength = 0], [string
$attr = ''])
|
|
Prints a text input element
Parameters:
displayTextarea [line 1018]
void displayTextarea(
string
$name, [mixed
$default = null], [int
$width = 40], [int
$height = 5], [int
$maxlength = ''], [string
$attr = ''])
|
|
Prints a textarea input
Parameters:
displayTextareaRow [line 1052]
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:
displayTextRow [line 834]
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:
end [line 780]
Prints the ending tags for the table and form NOTE: can NOT be called statically.
returnBlank [line 2268]
Produce a string containing
returnBlankRow [line 2294]
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:
returnCheckbox [line 1744]
string returnCheckbox(
string
$name, [bool
$default = false], [string
$attr = ''])
|
|
Produce a string containing a checkbox input
Parameters:
returnCheckboxRow [line 1775]
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:
returnEnd [line 2482]
Produces a string containing the opening tags for the form and table NOTE: can NOT be called statically.
returnFile [line 2335]
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:
returnFileRow [line 2376]
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:
returnHidden [line 2248]
string returnHidden(
string
$name, string
$value, [string
$attr = ''])
|
|
Produce a string containing a hiden input
Parameters:
returnImage [line 2190]
string returnImage(
string
$name, string
$src, [string
$attr = ''])
|
|
Produce a string containing an image input
Parameters:
returnImageRow [line 2220]
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:
returnMultipleFiles [line 2415]
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:
returnPassword [line 1628]
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:
returnPasswordOneRow [line 1710]
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:
returnPasswordRow [line 1665]
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:
returnPlaintext [line 2515]
string returnPlaintext(
[string
$text = ' '])
|
|
Produce a string containing the text provided
Parameters:
returnPlaintextRow [line 2539]
string returnPlaintextRow(
string
$title, [string
$text = ' '], [string
$thattr = HTML_FORM_TH_ATTR], [string
$tdattr = HTML_FORM_TD_ATTR])
|
|
Produce a string containing the text provided inside a table row
Parameters:
returnRadio [line 2127]
string returnRadio(
string
$name, string
$value, [bool
$default = false], [string
$attr = ''])
|
|
Produce a string containing a radio input
Parameters:
returnRadioRow [line 2159]
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:
returnReset [line 1948]
string returnReset(
[string
$title = 'Clear contents'], [string
$attr = ''])
|
|
Produce a string containing a reset button NOTE: Unusual parameter order.
Parameters:
returnResetRow [line 1976]
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:
returnSelect [line 2020]
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:
returnSelectRow [line 2092]
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:
returnStart [line 2450]
string returnStart(
[bool
$multipartformdata = false])
|
|
Produces a string containing the opening tags for the form and table NOTE: can NOT be called statically.
Parameters:
returnSubmit [line 1888]
string returnSubmit(
[string
$title = 'Submit Changes'], [string
$name = 'submit'], [string
$attr = ''])
|
|
Produce a string containing a submit button NOTE: Unusual parameter order.
Parameters:
returnSubmitRow [line 1916]
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:
returnText [line 1558]
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:
returnTextarea [line 1811]
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:
returnTextareaRow [line 1853]
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:
returnTextRow [line 1593]
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:
setDefaultFromInput [line 274]
void setDefaultFromInput(
boolean
$bool)
|
|
Enables/Disables $_GET/$_POST user input data showing up in fields when a $default hasn't been set The default is TRUE.
Parameters:
setEscapeDefaultFromInput [line 293]
void setEscapeDefaultFromInput(
boolean
$bool)
|
|
Enables/Disables escaping of the $_GET/$_POST data that shows up in fields when a $default hasn't been set The default is TRUE. Uses htmlspecialchars() for the escaping.
Parameters:
start [line 762]
void start(
[bool
$multipartformdata = false])
|
|
Prints the opening tags for the form and table NOTE: can NOT be called statically.
Parameters:
Documentation generated on Mon, 11 Mar 2019 14:45:03 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|