I have a symfony form which have crea开发者_开发问答ted_at and updated_at field for date. But I want to populate this field with default value and not shown when the form shows. So that, the created_at will hold the current time when inserting new data and updated_at will hold current date when updating any data.
These fields are automatically handled by propel. Simply unset() the fields in the form, and let propel do the magic :)
If you're using doctrine, add the Timestampable behavior to your class and unset the fields in the form, and it'll work too.
精彩评论