Methods summary
public
string
|
#
Render( $controllerDashedName = NULL, $actionDashedName = NULL )
Render whole <form> with all content into HTML string to display it.
- If form is not initialized, there is automatically
called $form->Init(); method.
- If form is not pre-dispatched for rendering, there is
automatically called $form->PreDispatch(); method.
- Create new form view instance and set up the view with local
context variables.
- Render form naturally or by custom template.
- Clean session errors, because errors should be rendered
only once, only when it's used and it's now - in this rendering process.
Render whole <form> with all content into HTML string to display it.
- If form is not initialized, there is automatically called $form->Init(); method.
- If form is not pre-dispatched for rendering, there is automatically called $form->PreDispatch(); method.
- Create new form view instance and set up the view with local context variables.
- Render form naturally or by custom template.
- Clean session errors, because errors should be rendered only once, only when it's used and it's now - in this rendering process.
Returns
string
|
public
string
|
#
RenderContent( )
Render form inner content, all field controls, content inside <form> tag,
without form errors. Go through all $form->fields and call $field->Render();
on every field instance and put field render result into an empty <div>
element. Render each field in full possible way - naturally by label
configuration with possible errors configured beside or with custom field template.
Render form inner content, all field controls, content inside <form> tag,
without form errors. Go through all $form->fields and call $field->Render();
on every field instance and put field render result into an empty <div>
element. Render each field in full possible way - naturally by label
configuration with possible errors configured beside or with custom field template.
Returns
string
|
public
string
|
#
RenderErrors( )
Render form errors to display them inside <form> element.
If form is configured to render all errors together at form beginning,
this function completes all form errors into div.errors with div.error elements
inside containing each single errors message.
Render form errors to display them inside <form> element.
If form is configured to render all errors together at form beginning,
this function completes all form errors into div.errors with div.error elements
inside containing each single errors message.
Returns
string
|
public
string
|
#
RenderBegin( )
Render form begin - opening <form> tag and automatically
prepared hidden input with CSRF (Cross Site Request Forgery) tokens.
Render form begin - opening <form> tag and automatically
prepared hidden input with CSRF (Cross Site Request Forgery) tokens.
Returns
string
|
public
string
|
#
RenderEnd( )
Render form end - closing </form> tag and supporting javascript and css files
only if there is necessary to add any supporting javascript or css files by
form configuration and if form is not using external JS/CSS renderer(s).
Render form end - closing </form> tag and supporting javascript and css files
only if there is necessary to add any supporting javascript or css files by
form configuration and if form is not using external JS/CSS renderer(s).
Returns
string
|
public
string
|
#
RenderSupportingCss( )
Render all supporting CSS files directly
as <style> tag content inside HTML template
placed directly after </form> end tag or
render all supporting CSS files by configured external
CSS files renderer to add only links to HTML response <head>
section, linked to external CSS source files.
Render all supporting CSS files directly
as <style> tag content inside HTML template
placed directly after </form> end tag or
render all supporting CSS files by configured external
CSS files renderer to add only links to HTML response <head>
section, linked to external CSS source files.
Returns
string
|
public
string
|
#
RenderSupportingJs( )
Render all supporting JS files directly
as <script> tag content inside HTML template
placed directly after </form> end tag or
render all supporting JS files by configured external
JS files renderer to add only links to HTML response <head>
section, linked to external JS source files.
Anyway there is always created at least one <script> tag
placed directly after </form> end tag with supporting javascripts
initializations - new MvcCoreForm(/*javascript*\/); - by rendered form fields
options, names, counts, values etc...
Render all supporting JS files directly
as <script> tag content inside HTML template
placed directly after </form> end tag or
render all supporting JS files by configured external
JS files renderer to add only links to HTML response <head>
section, linked to external JS source files.
Anyway there is always created at least one <script> tag
placed directly after </form> end tag with supporting javascripts
initializations - new MvcCoreForm(/*javascript*\/); - by rendered form fields
options, names, counts, values etc...
Returns
string
|
protected
MvcCore\Ext\Form
|
#
cleanSessionErrorsAfterRender( )
Call this function after form has been rendered
to clear session errors, because there is not necessary
to have there those errors anymore, because will be
displayed in rendered form.
Call this function after form has been rendered
to clear session errors, because there is not necessary
to have there those errors anymore, because will be
displayed in rendered form.
Returns
|