Setting the default value for a filed using php code
I have a field called Year it is of type List(integer)on a form using a select list widget.
I want to use php code to set it as a default to this year - 2012.
I have the years from 2000 until 2030 listed in the table.
I tried this code but it did not work?
$currentyear = intval(date('Y'));
return array (
0 => array($currentyear),
Then I tried the code
Just to see if I could get it to work.
The form saves the code but the default does not show the right year?