There are a few different methods you can use if you’d like to hide created_at and updated_at columns from your generated forms.
The first way, and the easiest, is to simply unset the fields in your form class:
class SampleForm extends BaseSampleForm { public function configure() { unset( $this['created_at'], $this['updated_at'] ); } } |
If you want the values to display in your form as read-only:
class SampleForm extends BaseSampleForm { public function configure() { $this->widgetSchema['created_at'] = new sfWidgetFormInput(array(), array('readonly'=>'readonly')); $this->widgetSchema['updated_at'] = new sfWidgetFormInput(array(), array('readonly'=>'readonly')); } } |


Pingback: uberVU - social comments
If you want to display plain text instead of input, you can create very simple widget:
http://jq11.blogspot.com/2009/10/readonly-fields-in-symfony.html