This is the base FormElement object. It can be single form field such as a text input field, or a complex object.
Usefull Functions
get_value() - This gets the current 'value' of the FormElement. NOTE: This can be a 'complex' FormElement in which it may return an array of values.
set_value() - Set the current value for this FormElement.
get_label() - returns the label for this FormElement.
Located in /form/FormElement.inc (line 39)
Class | Description |
---|---|
FEHidden | This is the Hidden FormElement which builds a input field of type="hidden". It has no validation method. |
FEError | This is a way of providing an Error to the FormProcessor. |
FEText | This is the Text FormElement which builds a text input field. It has no validation method. |
FEBoxElement | This is the Box FormElement which builds a DIV with a width and a height. It is a base class for more complicated FormElements. |
FERadioGroup | This is the Radio Button Group FormElement which builds a List of Radio buttons that can be used in any style of layout. |
FECheckBox | This is the CheckBox FormElement which builds a input field of type="checkbox". It has no validation method. |
variable to store JS onclick
variable to store JS onclick
variable to store JS onclick
variable to store JS onclick
variable to store JS onclick
Holds additional attributes for
the elements html tag
Holds the name of the element
as it appears in the form html tag
holds the array of errors for this element.
Holds the error message text
for validation errors, if any
This holds the name of the form
for js that needs it
Holds the state of the last validation
Sets to true in case of a validation error
This Form Element needs to propogate some js to the Form tag's onsubmit attribute
Indicates a disabled element
Indicates this element is read only. The get_element() will return the get_value_text() instead of the form.
Indicates whether this elements
final value is required and cannot be empty
The form Element's flag to add the : character at the end of the label.
Holds the elements label text
The required field string
This holds an array of FormElement objects
that are slaves of this element
automatically strip slashes from
form values?
Holds additional style attributes for
the elements html tag
Flag to tell us to enable
validation or not
Holds the elements initial value
The constructor
This private method is used to build the id attribute value string
This function creates element name
used in the form based on the text label or any other parameters
This method sets a flag to enable/disable validation for the Element.
This is a method for getting the JS needed for the form tag's onsubmit attribute.
return a single attribute
This method returns the hidden version of this element for a confirmation page.
NOTE: This is called by the FormProcessor only. It shouldn't be called manually.
This function builds and returns the form element object. This method ignores the readonly flag.
Returns the element name to be used in the form
This returns the array of errors for this element
Returns the current error message if any
This method checks to see if
this element is readonly and returns the get_value_text() or returns get_element() if it isn't readonly
This returns the initial value of the element
This function builds and returns a label object based on the label text and error conditions
This function will return the elements label text
This function return the symbol used to denote a required field
This function will return the slaves of this element
Gets the current tab index if any
This function will return the elements value
This provides a method
for the FormContent to get access to the text associated with a field. This is only available on FormElements that have text associated with a field. It is used during Confirmation
Returns the current error state
Returns the elements disabled state
Is this element in read only mode?
Returns whether this elements final value cannot be empty
This method is used for adding any javascript that is used by this element. This will automatically get called and added to the page by the FormProcessor
This function return the javaScript code for
an onBlur event Note: if you override this function be sure to use the appropriate $this->onClickJS and append your JS to it before returning
this function retuns the javaScript code for
an onChange event Note: if you override this function be sure to use the appropriate $this->onClickJS and append your JS to it before returning
This function return the javaScript code for
an onClick event Note: if you override this function be sure to use the appropriate $this->onClickJS and append your JS to it before returning
This function return the javaScript code for
an onFocus event Note: if you override this function be sure to use the appropriate $this->onClickJS and append your JS to it before returning
This function return the javaScript code for
an onSubmit event Note: if you override this function be sure to use the appropriate $this->onClickJS and append your JS to it before returning
add a single attribute (name="value")
This method sets the flag to have ALL of the FormElement's labels be appended with a : character. Some folks like this for some completely unexplained reason.
This function will call set_slave_data for all slaves should be called when value of parent changes
Sets the disabled element flag
This allows you to force the element name to whatever you like, so you don't have to use the default name, which is generated based on the label.
Defines error message text and sets the error flag to true
in case anyone in JS land needs the name of the form that this element lives in
This function will set the label for the element
This method sets the onblur javascript
This method sets the onChange javascript
This method sets the onclick javascript
This method sets the onfocus javascript
This method sets the onSubmit javascript
This sets the readonly flag.
When this flag is set, the FormContent gets back the get_value_text() instead of get_element().
This function set the elements required state
This allows you to customize the require string marker
This function will set the data the parent wants to set for the slave
This function will set the slaves of this element
This sets the stripslashes flag for this object.
Sets elements css attribute
Sets the element's tab index
Sets elements title text
This function will set the initial value for the element
This function performs the actual validation It is called only if the validation is required by this element
This function is responsible for performing complete validation and setting the appropriate error message in case of a failed validation
This function builds the element form attributes
This function builds the complete javaScript events code for the element
This function checks if the validation is nesseccary and calls the validate method
This private method sanitizes a string for putting in a form element attribute value
Documentation generated on Fri, 28 Jan 2011 08:53:06 -0500 by phpDocumentor 1.4.3