Hi,

Do you know how to use generateFieldNames() with $actsAs?

I've got model:

class Page extends AppModel
{
        public $name = 'Page';
        public $actsAs = array('Translate' => array('title', 'body'));
}

...controller:

class PagesController extends AppController
{
        public $helpers = array('Html', 'Form');

        function admin_add()
        {
                $this -> set('fieldNames', $this -> generateFieldNames());
                if (!empty($this -> data['Page']))
                {
                                    ...
                }
        }
}

...and view:

<?php
echo $form -> create('Page');
echo $form -> inputs($fieldNames);
echo $form -> end();
?>

The problem is that generateFieldNames() returns only fields wich are
physically defined in pages table in DB and returns no title and body
fields. Do you know how to make generateFieldNames() to return also
translated fields?


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

Reply via email to