Saturday, June 4, 2011

Controller without Model - passing data to formhelper?

Hi there,

for some analysis I need a controller collectingh data from other
models.
So I created a file /controllers/reportings_controller.php wich has a
code like this:

class ReportingsController extends AppController {
var $name = 'Reportings';
var $uses = array
('approval','client','benefactor','supplier','staff','benefit','TimeReport');

function index() {
$clients = $this->client->find('list');
$staffs = $this->staff->find('list'); }

....
}

if I add a debug ($clients); inside the controller I get the clients
as array.
If I add a $this->Form->input('client_id') inside my index.ctp file
to select a client from list/database
I only get an empty input field instead of a dropdown selction list.

help please :-/

Thanks

Michael

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: