Property | Type | Description | |
---|---|---|---|
$httpRequest | used only by standalone form | ||
$onError | function (Form $sender); Occurs when the form is submitted and is not valid | ||
$onRender | function (Form $sender); Occurs before the form is rendered | ||
$onSubmit | function (Form $sender); Occurs when the form is submitted | ||
$onSuccess | function (Form $sender); Occurs when the form is submitted and successfully validated |
Method | Description | |
---|---|---|
__construct ( $name = NULL ) | Form constructor. | |
__toString ( ) : string | Renders form to string. | |
addError ( $message ) : void | Adds global error message. | |
addGroup ( $caption = NULL, $setAsCurrent = TRUE ) : |
Adds fieldset group to the form. | |
addProtection ( $message = NULL ) : |
Cross-Site Request Forgery (CSRF) form protection. | |
cleanErrors ( ) : void | ||
fireEvents ( ) : void | Fires submit/click events. | |
fireRenderEvents ( ) : void | Must be called before form is rendered and render() is not used. | |
getAction ( ) : mixed | Returns form's action. | |
getElementPrototype ( ) : Nette\Utils\Html | Returns form's HTML element template. | |
getErrors ( ) : array | Returns global validation errors. | |
getForm ( $need = TRUE ) : self | Returns self. | |
getGroup ( $name ) : |
Returns the specified group. | |
getGroups ( ) : |
Returns all defined groups. | |
getHttpData ( $type = NULL, $htmlName = NULL ) : mixed | Returns submitted HTTP data. | |
getMethod ( ) : string | Returns form's method. | |
getOwnErrors ( ) : array | Returns form's validation errors. | |
getRenderer ( ) : Nette\Forms\IFormRenderer | Returns form renderer. | |
getToggles ( ) : array | ||
getTranslator ( ) : Nette\Localization\ITranslator | null | Returns translate adapter. | |
hasErrors ( ) : boolean | ||
isAnchored ( ) : boolean | Tells if the form is anchored. | |
isMethod ( $method ) : boolean | Checks if the request method is the given one. | |
isSubmitted ( ) : Nette\Forms\ISubmitterControl | FALSE | Tells if the form was submitted. | |
isSuccess ( ) : boolean | Tells if the form was submitted and successfully validated. | |
removeGroup ( $name ) : void | Removes fieldset group from form. | |
render ( $args ) : void | Renders form. | |
setAction ( $url ) : self | Sets form's action. | |
setMethod ( $method ) : self | Sets form's method. | |
setRenderer ( Nette\Forms\IFormRenderer $renderer = NULL ) : self | Sets form renderer. | |
setSubmittedBy ( Nette\Forms\ISubmitterControl $by = NULL ) : self | Sets the submittor control. | |
setTranslator ( Nette\Localization\ITranslator $translator = NULL ) : self | Sets translate adapter. | |
validate ( array $controls = NULL ) | ******************* validation ****************d*g* | |
validateMaxPostSize ( ) |
Method | Description | |
---|---|---|
attached ( $obj ) : void | This method will be called when the component (or component's parent) becomes attached to a monitored object. Do not call this method yourself. | |
beforeRender ( ) : void | ||
receiveHttpData ( ) : array | null | Internal: returns submitted HTTP data or NULL when form was not submitted. | |
validateParent ( Nette\ComponentModel\IContainer $parent ) : void |
Method | Description | |
---|---|---|
getHttpRequest ( ) : Nette\Http\IRequest |
public addGroup ( $caption = NULL, $setAsCurrent = TRUE ) : |
||
return |
public addProtection ( $message = NULL ) : |
||
return |
public fireRenderEvents ( ) : void | ||
return | void |
public getElementPrototype ( ) : Nette\Utils\Html | ||
return | Nette\Utils\Html |
public getGroup ( $name ) : |
||
return |
public getGroups ( ) : |
||
return |
public getHttpData ( $type = NULL, $htmlName = NULL ) : mixed | ||
return | mixed |
public getOwnErrors ( ) : array | ||
return | array |
public getRenderer ( ) : Nette\Forms\IFormRenderer | ||
return | Nette\Forms\IFormRenderer |
public getTranslator ( ) : Nette\Localization\ITranslator | null | ||
return | Nette\Localization\ITranslator | null |
public isAnchored ( ) : boolean | ||
return | boolean |
public isSubmitted ( ) : Nette\Forms\ISubmitterControl | FALSE | ||
return | Nette\Forms\ISubmitterControl | FALSE | submittor control |
protected receiveHttpData ( ) : array | null | ||
return | array | null |
public removeGroup ( $name ) : void | ||
return | void |
public setRenderer ( Nette\Forms\IFormRenderer $renderer = NULL ) : self | ||
$renderer | Nette\Forms\IFormRenderer | |
return | self |
public setSubmittedBy ( Nette\Forms\ISubmitterControl $by = NULL ) : self | ||
$by | Nette\Forms\ISubmitterControl | |
return | self |
public setTranslator ( Nette\Localization\ITranslator $translator = NULL ) : self | ||
$translator | Nette\Localization\ITranslator | |
return | self |
protected validateParent ( Nette\ComponentModel\IContainer $parent ) : void | ||
$parent | Nette\ComponentModel\IContainer | |
return | void |
public $onError |
public $onRender |
public $onSubmit |