Dom_Form
public class Dom_Form
| Field Summary | |
|---|---|
| protected array | An Array of Dom_FormElement objects |
| protected DOMElement | |
| protected Dom_Template | |
| Constructor Summary | |
|---|---|
__construct(DOMElement form, mixed elements, Dom_Template parent, array element) __construct |
|
| Method Summary | |
|---|---|
| void | appendHiddenElement(string name, string value) Append a hidden element to a form. |
| private void | elementExists(string key, string property) Check if a repeat,choice,var,form (template property) exists. |
| array | Get an array containing the form element names |
| Dom_FormElement | getFormElement(string name, int i) Return the form element with the name. |
| array | getFormElementList(string name) Get an array of form elements with the name value Used for radioboxes and multi select lists |
| unknown | Get an array of the hidden elements in this form |
| void | getId() |
| string | getName() Get the form name. |
| DOMElement | getNode() Get the DOMElement of this form object. |
| int | getNumFormElements(string name) Return the number of elements in an element namespace |
| Dom_Template | Get the parent template for this form |
| void | setAction(mixed value, string action) Set a URL that defines where to send the data when the submit button is pushed. |
| void | setCheckedByValue(string name, string value) Set/unset the checkboxes and radioboxes. |
| void | setMethod(mixed value, string method) The HTTP method for sending data to the action URL. |
| void | setTarget(mixed value, string target) Set the method used by the form. |
protected array $elements = array()
An Array of Dom_FormElement objects
protected DOMElement $form = null
protected Dom_Template $parent = null
public __construct(DOMElement form, mixed elements, Dom_Template parent, array element)
__construct
public void appendHiddenElement(string name, string value)
Append a hidden element to a form.
private void elementExists(string key, string property)
Check if a repeat,choice,var,form (template property) exists.
public array getElementNames()
Get an array containing the form element names
public Dom_FormElement getFormElement(string name, int i)
Return the form element with the name.
public array getFormElementList(string name)
Get an array of form elements with the name value Used for radioboxes and multi select lists
public unknown getHiddenElements()
Get an array of the hidden elements in this form
public void getId()
public string getName()
Get the form name.
public DOMElement getNode()
Get the DOMElement of this form object.
public int getNumFormElements(string name)
Return the number of elements in an element namespace
public Dom_Template getTemplate()
Get the parent template for this form
public void setAction(mixed value, string action)
Set a URL that defines where to send the data when the submit button is pushed.
public void setCheckedByValue(string name, string value)
Set/unset the checkboxes and radioboxes.
NOTE: This is called by Dom_FormInputElement
$value is not required for checkboxes
public void setMethod(mixed value, string method)
The HTTP method for sending data to the action URL.
Default is get.
Possible values are:
public void setTarget(mixed value, string target)
Set the method used by the form.
Possible values are:
The form package make an API available for rendering a form and its elements
The form package currently does not fully support element arrays. It can be done but it is not fully supported or tested.