1

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; ?>
3
  • 1
    That is not valid request data. What exactly are you trying to send to the view? The company information? Ellaborate on $this->set(); is not working. Commented Feb 1, 2013 at 12:04
  • Html doesn't belong in the controller, it should be in the View Commented Feb 2, 2013 at 21:30
  • I have to set html in the view.but how? Commented Feb 4, 2013 at 7:13

1 Answer 1

2

In case you are talking about data to fill form

$this->request->data = $this->YourModel->find(); 

should do the trick.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.