My model User has a belongsTo relationship with Country. So when I add
$this->Form->input('country');
in register.ctp for example, a selectfield of countries is shown.
<select name="foo">
<option value="germany">Germany</option>
<option value="finland">Finland</option>
<option value="usa">USA</option>
</select>
So my question is: Is there a cakeway of getting an empty optionfield as first in the selectfield?
Like:
<select name="foo">
<option value="0"></option>
<option value="germany">Germany</option>
<option value="finland">Finland</option>
<option value="usa">USA</option>
</select>
try this…