I am a Cake PHP novice.
I want to edit the table "Issue". This table contains a field "priority_id" related to another table called "Priority" by an foreign key. This table contains three values "Severe", "Disaster", "ToDo". User can select the priority using a combobox (input select).
The priorities are loaded like this:
$priorities = $this->Issue->Priority->find('list');
This works for me.
I need to add a fourth option to the combobox called "Choose". This value will be a default one. The user cannot submit the form when this value is selected. The motivation is to force the user to select one of the meaningful values instead of submitting the first one randomly.
1) How can I fill the array $priorities ? 2) How can i validate the form?
Thanks