PHP Class Prado\Web\UI\TForm

TForm displays an HTML form. Besides regular body content, it displays hidden fields, javascript blocks and files that are registered through {@link TClientScriptManager}. A TForm is required for a page that needs postback. Each page can contain at most one TForm. If multiple HTML forms are needed, please use regular HTML form tags for those forms that post to different URLs.
Since: 3.0
Author: Qiang Xue ([email protected])
Inheritance: extends TControl
Datei anzeigen Open project: pradosoft/prado

Public Methods

Method Description
getDefaultButton ( ) : string
getEnctype ( ) : string
getMethod ( ) : string
getName ( ) : string
onInit ( $param ) Registers the form with the page.
render ( $writer ) Renders the form.
setDefaultButton ( $value ) Sets a button to be default one in a form.
setEnctype ( $value )
setMethod ( $value )

Protected Methods

Method Description
addAttributesToRender ( $writer ) Adds form specific attributes to renderer.

Method Details

addAttributesToRender() protected method

Adds form specific attributes to renderer.
protected addAttributesToRender ( $writer )

getDefaultButton() public method

public getDefaultButton ( ) : string
return string id path to the default button control.

getEnctype() public method

public getEnctype ( ) : string
return string the encoding type a browser uses to post data back to the server

getMethod() public method

public getMethod ( ) : string
return string form submission method. Defaults to 'post'.

getName() public method

public getName ( ) : string
return string form name, which is equal to {@link getUniqueID UniqueID}.

onInit() public method

Registers the form with the page.
public onInit ( $param )

render() public method

Renders the form.
public render ( $writer )

setDefaultButton() public method

A default button will be clicked if a user presses 'Enter' key within the form.
public setDefaultButton ( $value )

setEnctype() public method

public setEnctype ( $value )

setMethod() public method

public setMethod ( $value )