If you want to pull in the partial updates from the handler, then the attribute name should be
data-request-update="resultsPartialName: '#results'"
You can use multiple partials also like this:
data-request-update="firstpartial: '#myDiv', secondpartial: '#otherDiv'"
The other way to go is to push the partial updates from the ajax handler. This feels a bit cleaner to me, but its is just the matter of preference.
function onRefreshTime()
{
return [
'#myDiv' => $this->renderPartial('mypartial')
];
}
Change into default.htm
if default.htm
in a folder, then replace data-request-update="foldername/default:'#results'"
<form data-request="{{ __SELF__ }}::onFormSubmit" data-request-validate>
<button class="btn btn-default" data-request="onHandleForm" data-request-update="default:'#results'">
</form>
0 comments:
Post a Comment
Thanks