phpDocumentor form
[ class tree: form ] [ index: form ] [ all elements ]

Class: Form

Source Location: /myphp-1.9/myphp-1.9-form/html/component/Form.php

Class Form

Class Overview

Generates a html form

  1. Usage:
  2. $form = new Form('goHere.php','get');
  3. $form->add(new SubmitButton($action,$method,$name,$attr,$title,$onsubmit));
  4. print $form->getHtml();
  5. Or:
  6. Form::start($action,$method,$name,$attr,$title,$onsubmit);
  7. elements::display()
  8. Form::end();
  9. Or:
  10. Form::start($action,$method,$name,$attr,$title,$onsubmit);
  11. Form::textarea();
  12. Form::submitbutton();
  13. :
  14. Form::end();

Located in /myphp-1.9/myphp-1.9-form/html/component/Form.php [line 62]

Object
   |
   --Html
      |
      --Form

Properties

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Html

Html::$elements
Html::$sizeof

Inherited From Object

Object::$cachefile
Object::$html
Object::$sql

Inherited From Html

Html::Html()
Constructor
Html::add()
Add an element, the number of elements are stored internally in an array.
Html::content()
Read the content of the specified filename
Html::display()
Display the html
Html::get()
Get the complete html for a key
Html::getAttribute()
Get the complete html for an attribute, i.e. <a class="myclass" ...
Html::getElement()
Get the element at position $i in array
Html::getElements()
Get all the elements as html
Html::getHtml()
Get Html
Html::getHtmlHelp()
Get html help
Html::getSizeof()
Get the number of elements added
Html::getTag()
Get the complete html for a html tag, i.e. <p>My paragraph</p>
Html::read()
Read the content of the specified filename and language
Html::set()
Set the named attribute (key) of a class to specified value
Html::setObject()
Set the named object to the class attribute (key), with same name
Html::showsource()
Show source
Html::update()
Save the content of the specified filename and language

Inherited From Object

Object::Object()
Constructor
Object::addHtml()
Add the current html to the SourceCode object
Object::getCacheFileName()
Returns the name of the cache file name
Object::getClassName()
Returns the name of the instanciated class
Object::getHtml()
Returns the html for the element
Object::getMsg()
Get the formatted message and debug level and Log to file ?
Object::save()
Save the SQL cache file
Object::setCacheFileName()
Set the path/name of the cache file
Object::toString()
Returns the information for this class
Object::write()
Write the content to the file opened by fp

[ Top ]
Property Summary
mixed   $action  
mixed   $attr  
mixed   $id  
mixed   $method  
mixed   $name  
mixed   $onsubmit  
mixed   $title  

[ Top ]
Method Summary
Form   Form()   Constructor
void   button()   Display html
void   cancelbutton()   Display html
void   checkbox()   Display html
void   disabled()   Display html
void   display()   Display html
void   end()   Display end html
void   fieldsetend()   Display html
void   fieldsetstart()   Display html
void   fileupload()   Display html
void   getEnd()  
String   getHidden()   Returns the html for the hidden fields of a form
void   getHtml()  
String   getStart()   Returns the html for the start of a form
void   hidden()   Display html
void   input()   Display html
void   label()   Display html
void   legend()   Display html
void   option()   Display html
void   password()   Display html
void   radio()   Display html
void   readonly()   Display html
void   resetbutton()   Display html
void   selectend()   Display html
void   selectstart()   Display html
void   start()   Display start html
void   submitbutton()   Display html
void   textarea()   Display html
void   textfield()   Display html

[ Top ]
Properties
mixed   $action = '' [line 63]

[ Top ]
mixed   $attr = '' [line 67]

[ Top ]
mixed   $id = '' [line 66]

[ Top ]
mixed   $method = '' [line 64]

[ Top ]
mixed   $name = '' [line 65]

[ Top ]
mixed   $onsubmit = '' [line 69]

[ Top ]
mixed   $title = '' [line 68]

[ Top ]
Methods
Constructor Form  [line 80]

  Form Form( [String $action = ''], [String $method = ''], [String $name = ''], [String $attr = ''], [String $title = ''], [String $onsubmit = '']  )

Constructor

Parameters:
String   $action:  The action where to go, default 'self'
String   $method:  The method get/post
String   $name:  The name if any (NOT xhtml 1.0 strict compliant)
String   $attr:  Additional attributes, i.e. 'enctype="multipart/form-data"'
String   $title:  The title (tooltip)
String   $onsubmit:  The onsubmit event


[ Top ]
button  [line 478]

  void button( [String $name = ''], [String $value = ''], [String $class = ''], [String $onclick = '']  )

Display html

  1. Usage:
  2. Form::button($name,$value,$class,$onclick);

Parameters:
String   $name:  the name
String   $value:  the value, if any
String   $class:  the class
String   $onclick:  On click event for javascript

API Tags:
Static:  


[ Top ]
cancelbutton  [line 540]

  void cancelbutton( [String $name = ''], [String $value = ''], [String $class = ''], [String $onclick = '']  )

Display html

  1. Usage:
  2. Form::cancelbuttonbutton($name,$value,$class,$onclick);

Parameters:
String   $name:  the name
String   $value:  the value, if any
String   $class:  the class
String   $onclick:  On click event for javascript

API Tags:
Static:  


[ Top ]
checkbox  [line 574]

  void checkbox( [String $name = ''], [String $value = ''], [String $class = ''], [String $checked = ''], [String $onclick = '']  )

Display html

  1. Usage:
  2. Form::checkbox($name,$value,$class,$checked,$onclick);

Parameters:
String   $name:  the name
String   $value:  the value, if any
String   $class:  the class
String   $checked:  if present
String   $onclick:  On click event for javascript

API Tags:
Static:  


[ Top ]
disabled  [line 408]

  void disabled( [String $name = ''], [String $value = ''], [String $class = ''], [String $size = ''], [String $maxlength = ''], [String $disabled = ''], [String $readonly = ''], [String $onclick = '']  )

Display html

  1. Usage:
  2. Form::disabled($name,$value,$class,$size,$maxlength,$disabled,$readonly,$onclick);

Parameters:
String   $name:  the name
String   $value:  the value, if any
String   $class:  the class
String   $size:  the size
String   $maxlength:  the maxlength
String   $disabled:  the disabled
String   $readonly:  the readonly
String   $onclick:  On click event for javascript

API Tags:
Static:  


[ Top ]
display  [line 229]

  void display( [String $action = ''], [String $method = ''], [String $name = ''], [String $attr = ''], [String $title = ''], [String $onsubmit = '']  )

Display html

  1. Usage:
  2. Form::display($name,$class,$attr);

Parameters:
String   $action:  The action where to go, default 'self'
String   $method:  The method get/post
String   $name:  The name if any (NOT xhtml 1.0 strict compliant)
String   $attr:  Additional attributes, i.e. 'enctype="multipart/form-data"'
String   $title:  The title (tooltip)
String   $onsubmit:  The onsubmit event

API Tags:
Static:  


Redefinition of:
Html::display()
Display the html

[ Top ]
end  [line 203]

  void end( [mixed $element = '']  )

Display end html

  1. Usage:
  2. Form::end($element);


API Tags:
Static:  


[ Top ]
fieldsetend  [line 330]

  void fieldsetend( )

Display html

  1. Usage:
  2. Form::fieldsetend();


API Tags:
Static:  


[ Top ]
fieldsetstart  [line 318]

  void fieldsetstart( [String $legend = ''], [String $class = '']  )

Display html

  1. Usage:
  2. Form::fieldsetstart($legend,$class);

Parameters:
String   $legend:  The legend object to use
String   $class:  The css class of the link

API Tags:
Static:  


[ Top ]
fileupload  [line 524]

  void fileupload( [String $name = ''], [String $class = '']  )

Display html

  1. Usage:
  2. Form::fileupload($name,$class);

Parameters:
String   $name:  the name
String   $class:  the class

API Tags:
Static:  


[ Top ]
getEnd  [line 153]

  void getEnd( )



[ Top ]
getHidden  [line 95]

  String getHidden( )

Returns the html for the hidden fields of a form


API Tags:
Return:  The html


[ Top ]
getHtml  [line 161]

  void getHtml( )



Redefinition of:
Html::getHtml()
Get Html

[ Top ]
getStart  [line 134]

  String getStart( )

Returns the html for the start of a form


API Tags:
Return:  The html


[ Top ]
hidden  [line 462]

  void hidden( [String $name = ''], [String $value = '']  )

Display html

  1. Usage:
  2. Form::hidden($name,$value);

Parameters:
String   $name:  the name
String   $value:  the value, if any

API Tags:
Static:  


[ Top ]
input  [line 368]

  void input( String $type, [String $name = ''], [String $value = ''], [String $class = ''], [String $size = ''], [String $maxlength = ''], [String $disabled = ''], [String $readonly = ''], [String $onclick = '']  )

Display html

  1. Usage:
  2. Form::input($type,$name,$value,$class,$size,$maxlength,$disabled,$readonly,$onclick);

Parameters:
String   $type:  the type (text, radio, checkbox, file, button, hidden, submit, reset)
String   $name:  the name
String   $value:  the value, if any
String   $class:  the class
String   $size:  the size / or checked for radio/checkbox
String   $maxlength:  the maxlength
String   $disabled:  the disabled
String   $readonly:  the readonly
String   $onclick:  On click event for javascript

API Tags:
Static:  


[ Top ]
label  [line 289]

  void label( String $text, [String $id = ''], [String $class = '']  )

Display html

  1. Usage:
  2. Form::label($text,$id,$class);

Parameters:
String   $text:  the text to show
String   $id:  the ID for the control to relate to
String   $class:  the class name

API Tags:
Static:  


[ Top ]
legend  [line 304]

  void legend( String $text, [String $class = ''], [String $accesskey = '']  )

Display html

  1. Usage:
  2. Form::legend($text,$class,$accesskey);

Parameters:
String   $text:  The text to show
String   $class:  The class name
String   $accesskey:  The access key

API Tags:
Static:  


[ Top ]
option  [line 262]

  void option( String $text, [String $value = ''], [String $selected = '']  )

Display html

  1. Usage:
  2. Form::option($text,$value,$selected);

Parameters:
String   $text:  the text to show
String   $value:  the value, if any
String   $selected:  The option is selected

API Tags:
Static:  


[ Top ]
password  [line 448]

  void password( [String $name = ''], [String $value = ''], [String $class = ''], [String $size = ''], [String $maxlength = ''], [String $disabled = ''], [String $readonly = ''], [String $onclick = '']  )

Display html

  1. Usage:
  2. Form::password($name,$value,$class,$size,$maxlength,$disabled,$readonly,$onclick);

Parameters:
String   $name:  the name
String   $value:  the value, if any
String   $class:  the class
String   $size:  the size
String   $maxlength:  the maxlength
String   $disabled:  the disabled
String   $readonly:  the readonly
String   $onclick:  On click event for javascript

API Tags:
Static:  


[ Top ]
radio  [line 557]

  void radio( [String $name = ''], [String $value = ''], [String $class = ''], [String $checked = ''], [String $onclick = '']  )

Display html

  1. Usage:
  2. Form::radio($name,$value,$class,$checked);

Parameters:
String   $name:  the name
String   $value:  the value, if any
String   $class:  the class
String   $checked:  if present
String   $onclick:  On click event for javascript

API Tags:
Static:  


[ Top ]
readonly  [line 428]

  void readonly( [String $name = ''], [String $value = ''], [String $class = ''], [String $size = ''], [String $maxlength = ''], [String $disabled = ''], [String $readonly = ''], [String $onclick = '']  )

Display html

  1. Usage:
  2. Form::readonly($name,$value,$class,$size,$maxlength,$disabled,$readonly,$onclick);

Parameters:
String   $name:  the name
String   $value:  the value, if any
String   $class:  the class
String   $size:  the size
String   $maxlength:  the maxlength
String   $disabled:  the disabled
String   $readonly:  the readonly
String   $onclick:  On click event for javascript

API Tags:
Static:  


[ Top ]
resetbutton  [line 494]

  void resetbutton( [String $name = ''], [String $value = ''], [String $class = ''], [String $onclick = '']  )

Display html

  1. Usage:
  2. Form::resetbutton($name,$value,$class,$onclick);

Parameters:
String   $name:  the name
String   $value:  the value, if any
String   $class:  the class
String   $onclick:  On click event for javascript

API Tags:
Static:  


[ Top ]
selectend  [line 274]

  void selectend( )

Display html

  1. Usage:
  2. Form::selectend();


API Tags:
Static:  


[ Top ]
selectstart  [line 247]

  void selectstart( String $name, [String $class = ''], [String $attr = '']  )

Display html

  1. Usage:
  2. Form::selectstart($name,$class,$attr);

Parameters:
String   $name:  The name of the control
String   $class:  The class name
String   $attr:  Additional atributes

API Tags:
Static:  


[ Top ]
start  [line 183]

  void start( [String $action = ''], [String $method = ''], [String $name = ''], [String $attr = ''], [String $title = ''], [String $onsubmit = '']  )

Display start html

  1. Usage:
  2. Form::start($action,$method,$name,$attr,$title,$onsubmit);

Parameters:
String   $action:  The action where to go, default 'self'
String   $method:  The method get/post
String   $name:  The name if any (NOT xhtml 1.0 strict compliant)
String   $attr:  Additional attributes, i.e. 'enctype="multipart/form-data"'
String   $title:  The title (tooltip)
String   $onsubmit:  The onsubmit event

API Tags:
Static:  


[ Top ]
submitbutton  [line 510]

  void submitbutton( [String $name = ''], [String $value = ''], [String $class = ''], [String $onclick = '']  )

Display html

  1. Usage:
  2. Form::submitbutton($name,$value,$class,$onclick);

Parameters:
String   $name:  the name
String   $value:  the value, if any
String   $class:  the class
String   $onclick:  On click event for javascript

API Tags:
Static:  


[ Top ]
textarea  [line 347]

  void textarea( String $name, [String $text = ''], [String $rows = ''], [String $cols = ''], [String $class = '']  )

Display html

  1. Usage:
  2. Form::textarea($name,$text='',$rows='',$cols='',$class='');

Parameters:
String   $name:  The name of the control
String   $text:  The text value, if any
String   $rows:  The number of rows
String   $cols:  The number of columns
String   $class:  The class name

API Tags:
Static:  


[ Top ]
textfield  [line 388]

  void textfield( [String $name = ''], [String $value = ''], [String $class = ''], [String $size = ''], [String $maxlength = ''], [String $disabled = ''], [String $readonly = ''], [String $onclick = '']  )

Display html

  1. Usage:
  2. Form::textfield($name,$value,$class,$size,$maxlength,$disabled,$readonly,$onclick);

Parameters:
String   $name:  the name
String   $value:  the value, if any
String   $class:  the class
String   $size:  the size
String   $maxlength:  the maxlength
String   $disabled:  the disabled
String   $readonly:  the readonly
String   $onclick:  On click event for javascript

API Tags:
Static:  


[ Top ]

Documentation generated on Thu, 22 Dec 2005 17:08:36 +0100 by phpDocumentor 1.3.0RC3