One oversight of symfony is that it does not add the MAXLENGTH attribute to the sfWidgetFormInput/sfWidgetFormInputText widget even though it knows the max length for a validator. For Propel (Doctrine too?), symfony 1.2/1.3 allows you to override the setup in BaseFormPropel in lib\form\BaseFormPropel.class.php. Overriding setup() allows you to add the MAXLENGTH attribute based on the validator.
public function setup() {
parent::setup();
foreach ($this->getWidgetSchema()->getFields() as $name => $widget)
{
$classname = get_class($widget);
if ($classname == 'sfWidgetFormInputText') {
if (($val = $this->getValidator($name)) && ($len = $val->getOption('max_length'))) {
$widget->setAttribute('maxlength', $len);
}
}
}
}