DomTemplate


Dom_FormElement

Class Dom_FormElement

Dom_FormElement

public abstract class Dom_FormElement

All form elements must use this class/interface.


Field Summary
protected DOMElement

$element

This could be a single DOMElement or an array of DOMElement

protected Dom_Form

$form

Constructor Summary

__construct(DOMElement element, Dom_Form form)

__construct

Method Summary
void

disable()

Disable this allement, add a disable attribute to the node

string

getAttribute(mixed name)

Set the name of this element

Dom_Form

getForm()

Get the parent DOM form object

string

getName()

Get the name of this element

DOMElement

getNode()

Get the DomElement node for this form element

Dom_Template

getTemplate()

Get the Element's Template

string

getType()

Return the form element type attribute

abstract mixed

getValue()

Return the value of the element, or the selected value.

boolean

isDisabled()

get the disabled state of this node

void

setAttribute(string name, string value)

Set the attribute name and value

void

setName(string name)

Set the name of this element

abstract void

setValue(string value)

Set the value of a form element.

Field Detail

element

protected DOMElement $element = null

This could be a single DOMElement or an array of DOMElement


form

protected Dom_Form $form = null


Constructor Detail

__construct

public __construct(DOMElement element, Dom_Form form)

__construct


Method Detail

disable

public void disable()

Disable this allement, add a disable attribute to the node


getAttribute

public string getAttribute(mixed name)

Set the name of this element


getForm

public Dom_Form getForm()

Get the parent DOM form object


getName

public string getName()

Get the name of this element

Returns:
The name of this element.

getNode

public DOMElement getNode()

Get the DomElement node for this form element


getTemplate

public Dom_Template getTemplate()

Get the Element's Template


getType

public string getType()

Return the form element type attribute


getValue

public abstract mixed getValue()

Return the value of the element, or the selected value.

Returns:
A string or an array of strings for * multiple select elements

isDisabled

public boolean isDisabled()

get the disabled state of this node


setAttribute

public void setAttribute(string name, string value)

Set the attribute name and value


setName

public void setName(string name)

Set the name of this element


setValue

public abstract void setValue(string value)

Set the value of a form element.

Set value behaves different for different elements:


DomTemplate