I am creating a form and I want to populate the DropdownField with items stored in a Product DataObject. I pretty much have it working but need to access the "Option" field which is the second field and not the "Name" field which is the first field.
I am using this
$Options = array('' => 'Please select') + DataObject::get('Product', "$this->ID",'Option')->toDropdownMap();
$f = new FieldSet(
new DropdownField('Color','Select Colour',$Options)
);