I generated a form, enabled the ajax validation and it works fine with I use 'render'.
I want this form to be a part of another page,so I used renderPartial, the ajax validation is not working.
Tried couple of searches in the the forum and found no good solution. Any help will be appreciated. Thanks :-)
Page 1 of 1
Ajax Validation in Render Partial ajax validation not in partial render
#3
Posted 14 August 2012 - 12:13 AM
The fields are not getting validated on the fly if i do renderPartial. However it works fine if I use render.
There is no such error I get, just that the ajax validation is not working.
There is no such error I get, just that the ajax validation is not working.
#4
Posted 14 August 2012 - 07:15 AM
Use it like this:
From http://www.yiiframew...Partial-detail:
$this->renderPartial('yourView', array(), false, true);
From http://www.yiiframew...Partial-detail:
Quote
renderPartial() method
public string renderPartial(string $view, array $data=NULL, boolean $return=false, boolean $processOutput=false)
$view - string - name of the view to be rendered. See getViewFile for details about how the view script is resolved.
$data - array - data to be extracted into PHP variables and made available to the view script
$return - boolean - whether the rendering result should be returned instead of being displayed to end users
$processOutput - boolean - whether the rendering result should be postprocessed using processOutput.
{return} - string - the rendering result. Null if the rendering result is not required.
public string renderPartial(string $view, array $data=NULL, boolean $return=false, boolean $processOutput=false)
$view - string - name of the view to be rendered. See getViewFile for details about how the view script is resolved.
$data - array - data to be extracted into PHP variables and made available to the view script
$return - boolean - whether the rendering result should be returned instead of being displayed to end users
$processOutput - boolean - whether the rendering result should be postprocessed using processOutput.
{return} - string - the rendering result. Null if the rendering result is not required.
#5
Posted 03 February 2014 - 12:22 AM
bennouna, on 14 August 2012 - 07:15 AM, said:
Use it like this:
From http://www.yiiframew...Partial-detail:
$this->renderPartial('yourView', array(), false, true);
From http://www.yiiframew...Partial-detail:
Share this topic:
Page 1 of 1