Child classes:
- HTMLNormalInput
- The base class for each of the HTML input elements. functionality which is common to all input types and the declarations of functions which need to be implemented individually.
- HTMLTextAreaInput
- The base class for each of the HTML input elements. functionality which is common to all input types and the declarations of functions which need to be implemented individually.
- HTMLSelectList
- The base class for each of the HTML input elements. functionality which is common to all input types and the declarations of functions which need to be implemented individually.
Inherited Variables
Inherited Constants
Inherited Methods
Class Details
The base class for each of the HTML input elements. functionality which is common to all input types and the declarations of functions which need to be implemented individually.
The base class for each of the HTML input elements. This will provide core functionality which is common to all input types and the declarations of functions which need to be implemented individually.
Tags:
- abstract -
[ Top ]
Class Variables
static $errors = NULL
[line 43]
A list of all of the error messages possible for the form builder.
A list of all of the error messages possible for the form builder.
Tags:
- access - protected
Type: mixed
Overrides:
[ Top ]
$attributes = array ()
[line 83]
The attributes which will be associated with the form element.
The attributes which will be associated with the form element.
Tags:
- access - protected
Type: mixed
Overrides:
[ Top ]
$form = NULL
[line 63]
The name of the form which is being submitted (to resolve naming collisions)
The name of the form which is being submitted (to resolve naming collisions)
Tags:
- access - protected
Type: mixed
Overrides:
[ Top ]
$id = NULL
[line 78]
The unique ID for this form element.
The unique ID for this form element.
Tags:
- access - protected
Type: mixed
Overrides:
[ Top ]
$label = NULL
[line 73]
The text which a label being generated for the corresponding input field.
The text which a label being generated for the corresponding input field.
Tags:
- access - protected
Type: mixed
Overrides:
[ Top ]
$name = NULL
[line 48]
The name which is associated with the input element.
The name which is associated with the input element.
Tags:
- access - protected
Type: mixed
Overrides:
[ Top ]
$remember = TRUE
[line 88]
Whether or not this field should be remembered on post / get.
Whether or not this field should be remembered on post / get.
Tags:
- access - protected
Type: mixed
Overrides:
[ Top ]
$type = NULL
[line 53]
The type of input element wrapped by this.
The type of input element wrapped by this.
Tags:
- access - protected
Type: mixed
Overrides:
[ Top ]
$value = NULL
[line 58]
The default value for this input element.
The default value for this input element.
Tags:
- access - protected
Type: mixed
Overrides:
[ Top ]
$values = array ()
[line 68]
The input values which the form will use (only used in some classes).
The input values which the form will use (only used in some classes).
Tags:
- access - protected
Type: mixed
Overrides:
[ Top ]
Class Methods
__construct
HTMLInputElement __construct(
string
$name, string
$type, [string
$value = ''], [string
$form = ''])
[line 99]
The only constructor for the HTMLInputElement abstract class. be called through all of the sub classesin order to set all properties accordingly.
The only constructor for the HTMLInputElement abstract class. This should be called through all of the sub classesin order to set all properties accordingly.
Tags:
- access - public
Overridden in child classes as:
- HTMLNormalInput::__construct()
- This constructor overrides the default constructor for the HTMLNormalInput class in order to make sure that the password field doesn't automatically remember the value which was submitted.
Parameters:
- string $name - - The name and ID for the form element
- string $type - - The type of field which will be used
- string $value - - The default value for the input field
- string $form - - The name of the form that the input element is in
[ Top ]
buildLabel
string buildLabel(
string
$formMD5)
[line 498]
This function is used in order to build the label if required for the HTML element.
This function is used in order to build the label if required for the HTML element.
Tags:
- return - - The HTML tag for the label
- access - protected
Parameters:
- string $formMD5 - - The unique MD5 for the form
[ Top ]
getAttribute
string getAttribute(
string
$name)
[line 226]
The getter for each of the attributes of the form element.
The getter for each of the attributes of the form element.
Tags:
- return - - The value associated with the attribute, or NULL if attribute was unset
- access - public
Parameters:
- string $name - - The name of the attribute being searched for
[ Top ]
getAttributes
string getAttributes(
$formMD5, [
$includeType = TRUE])
[line 465]
This function is used in order to list all of the attributes which are associated with the corresponding input element.
This function is used in order to list all of the attributes which are associated with the corresponding input element.
Tags:
- return - - The list of attributes for the specified input element
- access - protected
Parameters:
- $formMD5 -
- $includeType -
[ Top ]
getCSSClass
string getCSSClass(
)
[line 179]
The getter for the CSS class for the form element.
The getter for the CSS class for the form element.
Tags:
- return - - The associated CSS class
- access - public
Parameters:
[ Top ]
getForm
- getForm(
)
[line 261]
The getter for the form name of an input element.
The getter for the form name of an input element.
Tags:
- return - The form name
- access - public
Parameters:
[ Top ]
getId
string getId(
)
[line 380]
The getter for the field element's id
The getter for the field element's id
Tags:
- return - - The field's unique id
- access - public
Parameters:
[ Top ]
getInputType
string getInputType(
)
[line 352]
The getter for the name and id attribute of the input element
The getter for the name and id attribute of the input element
Tags:
- return - - The name of the html element
- access - public
Parameters:
[ Top ]
getLabel
string getLabel(
)
[line 161]
The getter for the label being created with the form element.
The getter for the label being created with the form element.
Tags:
- return - - The label text
- access - public
Parameters:
[ Top ]
getLabelCSSClass
string getLabelCSSClass(
)
[line 197]
The getter for the CSS class for the form element.
The getter for the CSS class for the form element.
Tags:
- return - - The associated CSS class
- access - public
Parameters:
[ Top ]
getName
string getName(
)
[line 421]
The getter for the name and id attribute of the input element
The getter for the name and id attribute of the input element
Tags:
- return - - The name of the html element
- access - public
Parameters:
[ Top ]
getRemember
boolean getRemember(
)
[line 455]
This function is used in order to return whether or not the 'remember' flag has been enabled.
This function is used in order to return whether or not the 'remember' flag has been enabled.
Tags:
- return - - TRUE if the value will be remembered from the submission, FALSE otherwise
- access - public
Parameters:
[ Top ]
getValue
string getValue(
string
$formMD5)
[line 289]
The getter for the value of the input field.
The getter for the value of the input field.
Tags:
- return - - The value associated with this input field
- access - public
Parameters:
- string $formMD5 - - The unique id for the form
[ Top ]
getValues
- getValues(
)
[line 270]
The getter for the set of default values for an input element.
The getter for the set of default values for an input element.
Tags:
- return - The default list of possible values
- access - public
Parameters:
[ Top ]
initializeValue
void initializeValue(
string
$formMD5,
&$array)
[line 310]
This function is run by the form in order to re-initialize the value for a particular input field if a post was completed for that particular form.
This function is run by the form in order to re-initialize the value for a particular input field if a post was completed for that particular form.
Tags:
- access - public
Parameters:
- string $formMD5 - - The unique form identifier which is included in the unique name of the HTML element.
- &$array -
[ Top ]
setAttribute
string setAttribute(
string
$name, [string
$value = ''])
[line 209]
The setter for each of the attributes of the form element.
The setter for each of the attributes of the form element.
Tags:
- return - - If previously set, the value which it was or NULL if the value was not set
- access - public
Parameters:
- string $name - - The name of the attribute being added
- string $value - - The value associated with the attribute
[ Top ]
setCSSClass
void setCSSClass(
string
$class)
[line 170]
The setter for the CSS class
The setter for the CSS class
Tags:
- access - public
Parameters:
- string $class - - The new CSS class to be set for the input element
[ Top ]
setForm
void setForm(
string
$form)
[line 249]
This is the setter for the form name of an element. propagate any changes to the unique identifier.
This is the setter for the form name of an element. This will also propagate any changes to the unique identifier.
Tags:
- access - public
Parameters:
- string $form - - The new form name
[ Top ]
setInputType
void setInputType(
$type, string
$name)
[line 333]
The setter for the name and id attribute of the input element.
The setter for the name and id attribute of the input element.
Tags:
- access - public
Parameters:
- string $name - - The name which will be used to identify this object
- $type -
[ Top ]
setLabel
void setLabel(
string
$label)
[line 152]
The setter for the label which can be created along with the rest of the form element.
The setter for the label which can be created along with the rest of the form element.
Tags:
- access - public
Parameters:
- string $label - - The text which the label will contain (NULL if no label is desired.
[ Top ]
setLabelCSSClass
void setLabelCSSClass(
string
$class)
[line 188]
The setter for the label's CSS class
The setter for the label's CSS class
Tags:
- access - public
Parameters:
- string $class - - The new CSS class to be set for the input element
[ Top ]
setName
void setName(
string
$name)
[line 389]
The setter for the name and id attribute of the input element.
The setter for the name and id attribute of the input element.
Tags:
- access - public
Parameters:
- string $name - - The name which will be used to identify this object
[ Top ]
setRemember
void setRemember(
boolean
$remember)
[line 432]
This function is used in order to set or unset the 'remember' flag which is used in the post-submission processing of a form.
This function is used in order to set or unset the 'remember' flag which is used in the post-submission processing of a form.
Tags:
- access - public
Parameters:
- boolean $remember - - TRUE if the value should be remembered FALSE otherwise
[ Top ]
setValue
void setValue(
$value
$value)
[line 279]
The setter for the default value of the input field.
The setter for the default value of the input field.
Tags:
- access - public
Parameters:
- $value $value - - The value which the field should start out as
[ Top ]
setValues
void setValues(
$values
$values, [boolen
$append = FALSE])
[line 144]
This abstract function is used in order to set the default list of values for particular input types.
This abstract function is used in order to set the default list of values for particular input types.
Tags:
- abstract -
- access - public
Overridden in child classes as:
- HTMLNormalInput::setValues()
- This abstract function is used in order to set the default list of values for particular input types.
- HTMLTextAreaInput::setValues()
- This abstract function is used in order to set the default list of values for particular input types.
- HTMLSelectList::setValues()
- This abstract function is used in order to set the default list of values for particular input types.
Parameters:
- boolen $append - - Whether the value should be appended to the list or not
- $values $values - - List of values which the input field may use
[ Top ]
toHTML
string toHTML(
string
$formMD5)
[line 121]
This function is used in order to convert the class which was created into the raw HTML form.
This function is used in order to convert the class which was created into the raw HTML form.
Tags:
- return - - The HTML which corresponds to the object created.
- access - public
Parameters:
- string $formMD5 - - The unique MD5 for the form
[ Top ]
toHTMLArray
array toHTMLArray(
string
$formMD5)
[line 136]
This abstract function is used in order to convert the object's HTML
This abstract function is used in order to convert the object's HTML information into an array which will then be used later on. The array will contain either ONE (1) or TWO (2) elements:
- HTML - the HTML relating to the actual input field
- LABEL - the label associated with the input field
Tags:
- return - - The array containing all of the information
- abstract -
- access - public
Overridden in child classes as:
- HTMLNormalInput::toHTMLArray()
- This function is used in order to convert the object's HTML
- HTMLTextAreaInput::toHTMLArray()
- This function is used in order to convert the object's HTML
- HTMLSelectList::toHTMLArray()
- This function is used in order to convert the object's HTML
Parameters:
- string $formMD5 - - The unique MD5 for the form
[ Top ]
updateId
void updateId(
)
[line 361]
This function is used internally to update the field element's id if the form or name elements are changed.
This function is used internally to update the field element's id if the form or name elements are changed.
Tags:
- access - protected
Parameters:
[ Top ]