phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
FormTrait Class Reference

trait used in Widget and HtmlForm More...

+ Inheritance diagram for FormTrait:

Public Member Functions

 setLoading ()
 
 setState ($state)
 
 setAttached ($value=true)
 
 addErrorMessage ()
 
 jsState ($state)
 
 submitOn ($event, $identifierOrElement, $url, $responseElement, $parameters=NULL)
 
 submitOnClick ($identifier, $url, $responseElement, $parameters=NULL)
 
 addSubmit ($identifier, $value, $cssStyle=NULL, $url=NULL, $responseElement=NULL, $parameters=NULL)
 
 setSubmitParams ($url, $responseElement=NULL, $parameters=NULL)
 
 addReset ($identifier, $value, $cssStyle=NULL)
 
 onValid ($jsCode)
 Callback on each valid field.
 
 onSuccess ($jsCode)
 Callback if a form is all valid.
 
 addExtraFieldRules ($fieldname, $rules)
 
 addExtraFieldRule ($fieldname, $type, $prompt=NULL, $value=NULL)
 
 setOptional ($fieldname, $optional=true)
 
 setActionTarget (string $action, string $target)
 

Protected Member Functions

 getForm ()
 
 addCompoValidation (Form $compo, HtmlFormField $field)
 
 addExtraCompoValidation (Form $compo, FieldValidation $validation)
 
 _runValidationParams (Form &$compo, JsUtils $js=NULL)
 
 _compileAjaxSubmit ($ajaxSubmit, JsUtils $js=null)
 
 _buttonAsSubmit (BaseHtml &$button, $event, $url, $responseElement=NULL, $parameters=NULL)
 

Detailed Description

trait used in Widget and HtmlForm

Author
jc

Definition at line 18 of file FormTrait.php.

Member Function Documentation

◆ _buttonAsSubmit()

_buttonAsSubmit ( BaseHtml $button,
  $event,
  $url,
  $responseElement = NULL,
  $parameters = NULL 
)
protected

Definition at line 117 of file FormTrait.php.

◆ _compileAjaxSubmit()

_compileAjaxSubmit (   $ajaxSubmit,
JsUtils  $js = null 
)
protected

Definition at line 51 of file FormTrait.php.

◆ _runValidationParams()

_runValidationParams ( Form $compo,
JsUtils  $js = NULL 
)
protected

Definition at line 38 of file FormTrait.php.

◆ addCompoValidation()

addCompoValidation ( Form  $compo,
HtmlFormField  $field 
)
protected

Definition at line 26 of file FormTrait.php.

◆ addErrorMessage()

addErrorMessage ( )

Reimplemented in Widget.

Definition at line 80 of file FormTrait.php.

◆ addExtraCompoValidation()

addExtraCompoValidation ( Form  $compo,
FieldValidation  $validation 
)
protected

Definition at line 34 of file FormTrait.php.

◆ addExtraFieldRule()

addExtraFieldRule (   $fieldname,
  $type,
  $prompt = NULL,
  $value = NULL 
)

Definition at line 172 of file FormTrait.php.

◆ addExtraFieldRules()

addExtraFieldRules (   $fieldname,
  $rules 
)

Definition at line 164 of file FormTrait.php.

◆ addReset()

addReset (   $identifier,
  $value,
  $cssStyle = NULL 
)

Definition at line 136 of file FormTrait.php.

◆ addSubmit()

addSubmit (   $identifier,
  $value,
  $cssStyle = NULL,
  $url = NULL,
  $responseElement = NULL,
  $parameters = NULL 
)

Definition at line 112 of file FormTrait.php.

◆ getForm()

getForm ( )
abstractprotected
Returns
HtmlForm

Reimplemented in Widget, HtmlForm, and DataForm.

◆ jsState()

jsState (   $state)

Definition at line 84 of file FormTrait.php.

◆ onSuccess()

onSuccess (   $jsCode)

Callback if a form is all valid.

Parameters
string$jsCodecan use event and fields parameters
Returns
HtmlForm

Definition at line 158 of file FormTrait.php.

◆ onValid()

onValid (   $jsCode)

Callback on each valid field.

Parameters
string$jsCode
Returns
\Ajax\semantic\html\collections\form\HtmlForm

Definition at line 147 of file FormTrait.php.

◆ setActionTarget()

setActionTarget ( string  $action,
string  $target 
)

Definition at line 184 of file FormTrait.php.

◆ setAttached()

setAttached (   $value = true)

Reimplemented in Widget.

Definition at line 73 of file FormTrait.php.

◆ setLoading()

setLoading ( )

Definition at line 64 of file FormTrait.php.

◆ setOptional()

setOptional (   $fieldname,
  $optional = true 
)

Definition at line 178 of file FormTrait.php.

◆ setState()

setState (   $state)

Definition at line 68 of file FormTrait.php.

◆ setSubmitParams()

setSubmitParams (   $url,
  $responseElement = NULL,
  $parameters = NULL 
)

Definition at line 126 of file FormTrait.php.

◆ submitOn()

submitOn (   $event,
  $identifierOrElement,
  $url,
  $responseElement,
  $parameters = NULL 
)
Parameters
string$event
string | BaseHtml$identifierOrElement
string$url
string$responseElement
array$parameters
Returns
HtmlForm

Definition at line 96 of file FormTrait.php.

◆ submitOnClick()

submitOnClick (   $identifier,
  $url,
  $responseElement,
  $parameters = NULL 
)

Definition at line 108 of file FormTrait.php.


The documentation for this class was generated from the following file: