Reputation: 664
I have to set request data which is in the form of HTML in CAKEPHP. Request Data is :
<div class="row">
<div class="span6">
<h3>Company Name</h3>
Company Address
</div>
<div class="span6">
<h5>INVOICE</h5>
</div>
</div>
How to set this in controller? $this->set() is not working.
$this->set('html', $this->request->data);
View :-
<?php echo $html; ?>
Upvotes: 1
Views: 1776
Reputation: 1274
In case you are talking about data to fill form
$this->request->data = $this->YourModel->find();
should do the trick.
Upvotes: 2