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

Class: HTML_QuickForm_element

Source Location: /HTML_QuickForm-3.2.3/QuickForm/element.php

Class Overview

HTML_Common
   |
   --HTML_QuickForm_element

Base class for form elements


Author(s):

Version:

  • 1.3

Methods


Child classes:

HTML_QuickForm_group
HTML class for a form element group
HTML_QuickForm_static
HTML class for static data
HTML_QuickForm_xbutton
Class for HTML 4.0 <button> element
HTML_QuickForm_select
Class to dynamically create an HTML SELECT
HTML_QuickForm_textarea
HTML class for a textarea type field
HTML_QuickForm_input
Base class for input form elements

Inherited Variables

Inherited Methods


Class Details

[line 34]
Base class for form elements


[ Top ]


Method Detail

HTML_QuickForm_element (Constructor)   [line 83]

void HTML_QuickForm_element( [string $elementName = null], [mixed $elementLabel = null], [mixed $attributes = null])

Class constructor
  • Since: 1.0
  • Access: public

Parameters:

string   $elementName   —  Name of the element
mixed   $elementLabel   —  Label(s) for the element
mixed   $attributes   —  Associative array of tag attributes or HTML attributes name="value" pairs

[ Top ]

accept   [line 385]

void accept( object An &$renderer, [bool $required = false], [string $error = null])

Accepts a renderer
  • Access: public

Overridden in child classes as:

HTML_QuickForm_group::accept()
Accepts a renderer
HTML_QuickForm_hierselect::accept()
Accepts a renderer
HTML_QuickForm_date::accept()
HTML_QuickForm_html::accept()
Accepts a renderer
HTML_QuickForm_header::accept()
Accepts a renderer
HTML_QuickForm_hiddenselect::accept()
This is essentially a hidden element and should be rendered as one
HTML_QuickForm_hidden::accept()
Accepts a renderer

Parameters:

object An   &$renderer   —  HTML_QuickForm_Renderer object
bool   $required   —  Whether an element is required
string   $error   —  An error message associated with an element

[ Top ]

apiVersion   [line 104]

float apiVersion( )

Returns the current API version
  • Since: 1.0
  • Access: public

Overridden in child classes as:

HTML_QuickForm_select::apiVersion()
Returns the current API version

[ Top ]

exportValue   [line 422]

mixed exportValue( array &$submitValues, [bool $assoc = false])

Returns a 'safe' element's value
  • Access: public

Overridden in child classes as:

HTML_QuickForm_group::exportValue()
As usual, to get the group's value we access its elements and call
HTML_QuickForm_static::exportValue()
We override this here because we don't want any values from static elements
HTML_QuickForm_xbutton::exportValue()
Returns a 'safe' element's value
HTML_QuickForm_select::exportValue()
We check the options and return only the values that _could_ have been
HTML_QuickForm_input::exportValue()
We don't need values from button-type elements (except submit) and files
HTML_QuickForm_radio::exportValue()
Returns the value attribute if the radio is checked, null if it is not
HTML_QuickForm_submit::exportValue()
Only return the value if it is found within $submitValues (i.e. if
HTML_QuickForm_checkbox::exportValue()
Return true if the checkbox is checked, null if it is not checked (getValue() returns false)
HTML_QuickForm_advcheckbox::exportValue()
This element has a value even if it is not checked, thus we override

Parameters:

array   &$submitValues   —  array of submitted values to search
bool   $assoc   —  whether to return the value as associative array

[ Top ]

freeze   [line 196]

void freeze( )

Freeze the element so that only its value is returned
  • Access: public

Overridden in child classes as:

HTML_QuickForm_xbutton::freeze()
HTML_QuickForm_reset::freeze()
Freeze the element so that only its value is returned
HTML_QuickForm_button::freeze()
Freeze the element so that only its value is returned
HTML_QuickForm_image::freeze()
Freeze the element so that only its value is returned
HTML_QuickForm_file::freeze()
Freeze the element so that only its value is returned
HTML_QuickForm_hidden::freeze()
Freeze the element so that only its value is returned
HTML_QuickForm_submit::freeze()
Freeze the element so that only its value is returned

[ Top ]

getFrozenHtml   [line 211]

string getFrozenHtml( )

Returns the value of field without HTML tags
  • Since: 1.0
  • Access: public

Overridden in child classes as:

HTML_QuickForm_group::getFrozenHtml()
Returns the value of field without HTML tags
HTML_QuickForm_static::getFrozenHtml()
Returns the value of field without HTML tags
HTML_QuickForm_link::getFrozenHtml()
Returns the value of field without HTML tags (in this case, value is changed to a mask)
HTML_QuickForm_xbutton::getFrozenHtml()
HTML_QuickForm_select::getFrozenHtml()
Returns the value of field without HTML tags
HTML_QuickForm_textarea::getFrozenHtml()
Returns the value of field without HTML tags (in this case, value is changed to a mask)
HTML_QuickForm_radio::getFrozenHtml()
Returns the value of field without HTML tags
HTML_QuickForm_password::getFrozenHtml()
Returns the value of field without HTML tags (in this case, value is changed to a mask)
HTML_QuickForm_checkbox::getFrozenHtml()
Returns the value of field without HTML tags
HTML_QuickForm_advcheckbox::getFrozenHtml()
Unlike checkbox, this has to append a hidden input in both

[ Top ]

getLabel   [line 298]

string getLabel( )

Returns display text for the element
  • Since: 1.3
  • Access: public

[ Top ]

getName   [line 150]

string getName( )

Returns the element name
  • Since: 1.0
  • Access: public

Overridden in child classes as:

HTML_QuickForm_group::getName()
Returns the group name
HTML_QuickForm_static::getName()
Returns the element name
HTML_QuickForm_link::getName()
Returns the element name
HTML_QuickForm_xbutton::getName()
HTML_QuickForm_select::getName()
Returns the element name
HTML_QuickForm_textarea::getName()
Returns the element name
HTML_QuickForm_input::getName()
Returns the element name

[ Top ]

getType   [line 119]

string getType( )

Returns element type
  • Since: 1.0
  • Access: public

[ Top ]

getValue   [line 181]

mixed getValue( )

Returns the value of the form element
  • Since: 1.0
  • Access: public

Overridden in child classes as:

HTML_QuickForm_group::getValue()
Returns the value of the group
HTML_QuickForm_link::getValue()
Returns the value of the form element
HTML_QuickForm_xbutton::getValue()
HTML_QuickForm_select::getValue()
Returns an array of the selected values
HTML_QuickForm_textarea::getValue()
Returns the value of the form element
HTML_QuickForm_input::getValue()
Returns the value of the form element
HTML_QuickForm_file::getValue()
Returns information about the uploaded file
HTML_QuickForm_checkbox::getValue()
Returns the value of the form element
HTML_QuickForm_advcheckbox::getValue()
Returns the element's value

[ Top ]

isFrozen   [line 250]

bool isFrozen( )

Returns whether or not the element is frozen
  • Since: 1.3
  • Access: public

[ Top ]

onQuickFormEvent   [line 342]

void onQuickFormEvent( string $event, mixed $arg, &$caller, object $caller)

Called by HTML_QuickForm whenever form event is made on this element
  • Since: 1.0
  • Access: public

Overridden in child classes as:

HTML_QuickForm_group::onQuickFormEvent()
Called by HTML_QuickForm whenever form event is made on this element
HTML_QuickForm_hierselect::onQuickFormEvent()
HTML_QuickForm_date::onQuickFormEvent()
HTML_QuickForm_static::onQuickFormEvent()
Called by HTML_QuickForm whenever form event is made on this element
HTML_QuickForm_xbutton::onQuickFormEvent()
HTML_QuickForm_input::onQuickFormEvent()
Called by HTML_QuickForm whenever form event is made on this element
HTML_QuickForm_file::onQuickFormEvent()
Called by HTML_QuickForm whenever form event is made on this element
HTML_QuickForm_radio::onQuickFormEvent()
Called by HTML_QuickForm whenever form event is made on this element
HTML_QuickForm_checkbox::onQuickFormEvent()
Called by HTML_QuickForm whenever form event is made on this element
HTML_QuickForm_advcheckbox::onQuickFormEvent()
Called by HTML_QuickForm whenever form event is made on this element

Parameters:

string   $event   —  Name of event
mixed   $arg   —  event arguments
object   $caller   —  calling object
   &$caller   — 

[ Top ]

setLabel   [line 283]

void setLabel( string $label)

Sets display text for the element
  • Since: 1.3
  • Access: public

Parameters:

string   $label   —  Display text for the element

[ Top ]

setName   [line 135]

void setName( string $name)

Sets the input field name
  • Since: 1.0
  • Access: public

Overridden in child classes as:

HTML_QuickForm_group::setName()
Sets the group name
HTML_QuickForm_static::setName()
Sets the element name
HTML_QuickForm_link::setName()
Sets the input field name
HTML_QuickForm_xbutton::setName()
HTML_QuickForm_select::setName()
Sets the input field name
HTML_QuickForm_textarea::setName()
Sets the input field name
HTML_QuickForm_input::setName()
Sets the input field name

Parameters:

string   $name   —  Input field name attribute

[ Top ]

setPersistantFreeze   [line 267]

void setPersistantFreeze( [bool $persistant = false])

Sets wether an element value should be kept in an hidden field when the element is frozen or not
  • Since: 2.0
  • Access: public

Parameters:

bool   $persistant   —  True if persistant value

[ Top ]

setValue   [line 166]

void setValue( string $value)

Sets the value of the form element
  • Since: 1.0
  • Access: public

Overridden in child classes as:

HTML_QuickForm_group::setValue()
Sets values for group's elements
HTML_QuickForm_hierselect::setValue()
Sets values for group's elements
HTML_QuickForm_date::setValue()
HTML_QuickForm_static::setValue()
Sets the text (uses the standard setValue call to emulate a form element.
HTML_QuickForm_link::setValue()
Sets value for textarea element
HTML_QuickForm_xbutton::setValue()
HTML_QuickForm_select::setValue()
Sets the value of the form element
HTML_QuickForm_textarea::setValue()
Sets value for textarea element
HTML_QuickForm_input::setValue()
Sets the value of the form element
HTML_QuickForm_file::setValue()
Sets value for file element.
HTML_QuickForm_checkbox::setValue()
Sets the value of the form element
HTML_QuickForm_advcheckbox::setValue()
Sets the element's value

Parameters:

string   $value   —  Default value of the form element

[ Top ]


Documentation generated on Mon, 11 Mar 2019 13:52:19 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.