Public Member Functions | |
form ($action, $method, $class= '', $encoding='') | |
constructs a new form | |
getAndIncTabIndex () | |
addFieldset () | |
add a fieldset | |
addLegend ($legend) | |
add a legend | |
addDropDown ($options, $default_value, $name, $id= '') | |
output a drop down | |
addListBox ($options, $selected_values, $name, $size, $id= '') | |
output a list box | |
addLabel ($text, $id= '') | |
add a label | |
addInputRaw ($type, $name, $alt, $value, $id, $ext, $class) | |
not to be used directly | |
addInput ($name, $alt, $value= '', $id= '') | |
add a text input | |
addPassword ($name, $value= '', $id= '') | |
add a password input | |
addHidden ($name, $value) | |
add an hidden field | |
addCheckBox ($name, $checked=false, $id= '') | |
add a checkbox | |
addRadioButton ($name, $value, $checked=false) | |
add a radio button | |
addButton ($name, $value, $class= '', $disabled=false) | |
add a button | |
addTextarea ($name, $rows, $cols, $value='', $id='') | |
add a textarea | |
addFileUploadButton ($name) | |
add an upload control | |
addHtml ($html) | |
add raw html | |
toHtml () | |
return complete form as html | |
Public Attributes | |
$blob | |
cached output | |
$openedFieldset | |
do we have an opened field set |
form::addButton | ( | $ | name, | |
$ | value, | |||
$ | class = '' , |
|||
$ | disabled = false | |||
) |
add a button
name | name of control | |
value | text button | |
class | css class | |
disabled | is button disabled ? |
form::addCheckBox | ( | $ | name, | |
$ | checked = false , |
|||
$ | id = '' | |||
) |
add a checkbox
name | name of control | |
checked | is checkbox initially checked | |
id | id of checkbox to add |
form::addDropDown | ( | $ | options, | |
$ | default_value, | |||
$ | name, | |||
$ | id = '' | |||
) |
output a drop down
options | list of option can be an array or an associative array | |
default_value | the default value the control must bear | |
name | the name the control is attached to | |
id | optional id |
form::addFieldset | ( | ) |
add a fieldset
this method may be called several times. When calling method toHtml(), the fieldset will be automatically closed
form::addFileUploadButton | ( | $ | name | ) |
add an upload control
name | name of control |
form::addHidden | ( | $ | name, | |
$ | value | |||
) |
add an hidden field
name | name of control | |
value | initial value (optional) |
form::addHtml | ( | $ | html | ) |
add raw html
html | raw html to add |
form::addInput | ( | $ | name, | |
$ | alt, | |||
$ | value = '' , |
|||
$ | id = '' | |||
) |
add a text input
name | name of control | |
alt | alt tag | |
value | initial value (optional) | |
id | css id (optional) |
form::addInputRaw | ( | $ | type, | |
$ | name, | |||
$ | alt, | |||
$ | value, | |||
$ | id, | |||
$ | ext, | |||
$ | class | |||
) |
not to be used directly
this method is private and is called from other addInput() like methods
type | type of html control (text, password, hidden, checkbox, radio, submit ...) | |
name | name of control | |
alt | alt tag (optional : maybe empty) | |
value | initial value (optional : maybe empty) | |
id | css id (optional : maybe empty) | |
ext | extra attributes (optional : maybe empty) | |
class | css class (optional : maybe empty) |
form::addLabel | ( | $ | text, | |
$ | id = '' | |||
) |
add a label
text | text to put in label | |
id | optional id |
form::addLegend | ( | $ | legend | ) |
add a legend
legend | the legend to add to form |
form::addListBox | ( | $ | options, | |
$ | selected_values, | |||
$ | name, | |||
$ | size, | |||
$ | id = '' | |||
) |
output a list box
options | list of option can be an array or an associative array | |
selected_values | array of selected values | |
name | the name the control is attached to | |
size | size of the list box | |
id | optional id |
form::addPassword | ( | $ | name, | |
$ | value = '' , |
|||
$ | id = '' | |||
) |
add a password input
name | name of control | |
value | initial value (optional) | |
id | css id (optional) |
form::addRadioButton | ( | $ | name, | |
$ | value, | |||
$ | checked = false | |||
) |
add a radio button
name | name of control | |
value | initial value (optional) | |
checked | is radiobutton initially checked |
form::addTextarea | ( | $ | name, | |
$ | rows, | |||
$ | cols, | |||
$ | value = '' , |
|||
$ | id = '' | |||
) |
add a textarea
name | name of control | |
rows | number of rows | |
cols | number of columns | |
value | text | |
id | id of textarea to add |
form::form | ( | $ | action, | |
$ | method, | |||
$ | class = '' , |
|||
$ | encoding = '' | |||
) |
constructs a new form
action | action target url | |
method | method to use ("post", "get") | |
class | optional class attribute | |
encoding | optional encoding to use |
form::toHtml | ( | ) |
return complete form as html
opened field set is closed
form::$blob |
cached output
form::$openedFieldset |
do we have an opened field set