Ok now I'm documented.

If you use $this->params['data']=$data at your controller, then in the
helper is accessible through $this->params['data']

If you use $this->data at  your controller, then in the helper
$this->data

The correct way is to check where is the data. From HtmlHelper:

        function tagValue($fieldName) {
                $this->setFormTag($fieldName);
                if (isset($this->params['data'][$this->model][$this->field])) {
                        return 
h($this->params['data'][$this->model][$this->field]);
                } elseif(isset($this->data[$this->model][$this->field])) {
                        return h($this->data[$this->model][$this->field]);
                }
                return false;
        }

You can use HtmlHelper in your own helper, and doing
$value=$this->Html->tagValue($fieldName) you will get the correct value


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to