Form data in the View

Note: This post is over a year old and the content may no longer be accurate.

Using CakePHP all your form fields are normally populated automatically, it is easy to forget that to access the POST array all you need to do is use either:

$this->data or $this->params[‘data’]

pr(); on either of these will present you with something like:

Array
(
    [Book] => Array
        (
            [id] => 402
            [name] => Everything about Everything
            [publisher] => 
            [ISBN] => 
            [publish_date] => 15/04/2001
            [summary] => 
        )

)