Q:

change the range of years shown on a select box - symfony

In my field created_at, in both newSuccess.php and editSuccess.php, is a select box and it only shows years from 2006 to 2016. How can I change this to show older years?

A:

You could set the "years" option of the sfWidgetFormDate which is part of sfWidgetFormDateTime
// e.g. this year till 1960
$years = range(round(date("Y")), 1960);

// get the DateWidget
$this->widgetSchema["created_at"]->getDateWidget()->setOption("years", $years);

If you only need the date component, I would suggest to overwrite the basic form
$this->widgetSchema["created_at"] = new sfWidgetFormDate(array("years" => $years));

See also 

http://www.symfony-project.org/api/1_4/sfWidgetFormDate

