hello,
im trying to send an array (with the name report) through a post request to "testpage/update" but i never receive the post data.
Im printing $report.test in the template and its show the correct value
php code
Template newpage_template_view
$_POST dump
im trying to send an array (with the name report) through a post request to "testpage/update" but i never receive the post data.
Im printing $report.test in the template and its show the correct value
php code
PHP:
$report = array();
$report['test'] = 'testvalue';
$report['requestid'] = 10;
...
$viewParams = [
'otherdata' => $otherdata,
'report' => $report,
'page' => $page,
'perPage' => $perPage
];
return $this->view(getName(), 'newpage_template_view', $viewParams);
Template newpage_template_view
HTML:
<div class="block">
<div class="block-container">
{{$report.test}}
<xf:form action="{{ link('testpage/update', $report) }}" ajax="true">
<div class="block-body">
<xf:textbox name="comment" maxlength="300" />
</div>
<xf:submitrow icon="save" rowtype="simple" />
</xf:form>
</div>
</div>
$_POST dump
Code:
Array
(
[comment] => test text
[_xfToken] => 1550754444,3db9a68220f5ea048c2424ec76444444
[_xfRequestUri] => /forum/index.php?testpage/view&requestid=10
[_xfWithData] => 1
[_xfResponseType] => json
)