form Class Reference

helper class to generate xhtml valid form More...

List of all members.

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


Detailed Description

helper class to generate xhtml valid form


Member Function Documentation

form::addButton ( name,
value,
class = '',
disabled = false 
)

add a button

Parameters:
name name of control
value text button
class css class
disabled is button disabled ?

form::addCheckBox ( name,
checked = false,
id = '' 
)

add a checkbox

Parameters:
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

Parameters:
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

Parameters:
name name of control

form::addHidden ( name,
value 
)

add an hidden field

Parameters:
name name of control
value initial value (optional)

form::addHtml ( html  ) 

add raw html

Parameters:
html raw html to add

form::addInput ( name,
alt,
value = '',
id = '' 
)

add a text input

Parameters:
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

Parameters:
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

Parameters:
text text to put in label
id optional id

form::addLegend ( legend  ) 

add a legend

Parameters:
legend the legend to add to form

form::addListBox ( options,
selected_values,
name,
size,
id = '' 
)

output a list box

Parameters:
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

Parameters:
name name of control
value initial value (optional)
id css id (optional)

form::addRadioButton ( name,
value,
checked = false 
)

add a radio button

Parameters:
name name of control
value initial value (optional)
checked is radiobutton initially checked

form::addTextarea ( name,
rows,
cols,
value = '',
id = '' 
)

add a textarea

Parameters:
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

Parameters:
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


Member Data Documentation

form::$blob

cached output

form::$openedFieldset

do we have an opened field set


The documentation for this class was generated from the following file:
Generated on Mon Feb 19 19:11:58 2007 for Wiclear by  doxygen 1.4.7