19 February 2009 at 4:06pm
I don't really know what the code for the $source is doing, but the documentation is here - http://doc.silverstripe.com/doku.php?id=optionsetfield - and note that $value refers to the index used in the $source array, not the number of the element in that array. Sorry, language is failing me here, but if your $source is
2 => "Apple"
54 => "Orange"
512 => "Banana"
then $value="2" will mean the default will be "Apple".