You can basically do this (in controller):

$this-&gt;set('tasks', $this-&gt;Task-&gt;find('list'));


And make an input with name task_id, and make sure to force it to be a select box, so (in views):

echo $form-&gt;input('task_id', array('label' =&gt; 'youLabelHere', 'type' =&gt; 'select'));


displayField gives you a chance to choose which field will be used as a displayed option (one of) in the select box, if it's not provided in model the script will look for 'name' or 'title'.

If you wan't to display projects in the users forms (add, edit option) then your associations aren't right. Always make sure that there is an association (with good, conventional tables and keys names) between two model when you want to make a select box, Cake makes it as easy as can it gets.

CakePHP displayField usage
I would like to take snapshots from an USB webcam

Firs I check the device:

pi@raspberrypi ~ $ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. 
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 004: ID 0ac8:332d Z-Star Microelectronics Corp. Vega USB 2.0 Camer


When I'm trying to grab an Image I'm receiving the following error:

pi@raspberrypi ~ $ fswebcam -d /dev/video0 -r 640x480 test.jpeg
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
--- Capturing frame...
Timed out waiting for frame!
No frames captured.


What can be the problem, I tested this method on Ubuntu with success. What can be the problem on Debian?

Using a USB Hub:

pi@raspberrypi ~ $ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. 
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 005: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 001 Device 006: ID 0ac8:332d Z-Star Microelectronics Corp. Vega USB 2.0 Camera
pi@raspberrypi ~ $ fswebcam -d /dev/video0 -r 640x480 test.jpeg
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
--- Capturing frame...
Timed out waiting for frame!
No frames captured.


This is the webcam.


