hi, i think that you have only to change your generator.yml edit: display: [descr, is_active] new: display: [image, descr, is_active]
don't forget you have to clear the cache for the prod controller after changin generator.yml and verify the indentation 2009/8/27 José Nahuel Cuesta Luengo <ncue...@cespi.unlp.edu.ar> > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Sid Bachtiar escribió: > > Hi all, > > > > I'm trying to understand the new admin generator for Symfony 1.2 > > > > I have a field 'image', and I don't want people to edit it, only when > > inserting new record. > > > > Do I have to create separate form class for this? > > > Sid, > > you can have inside the form the logic that decides whether or not to > show the field: > > [php] > // In your form's configure method > // ... > > if ($this->isNew()) > { > $this->setWidget('image', new sfWidgetFormXXX()); > $this->setValidator('image', new sfValidatorXXX()); > } > else > { > unset($this['image']); > } > > // ... > [/php] > > Hope this helps! > > Best regards > > - -- > José Nahuel Cuesta Luengo > Desarrollo | CeSPI - UNLP > <ncue...@cespi.unlp.edu.ar> > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAkqXCxQACgkQ2jTpOyePgAGrcQCeJmJTFac6YbPlT5cIPRxMB/Ah > Am4AoIrDDmIJ8S2DlfCqnh8/FlJ2Sbr8 > =G3c6 > -----END PGP SIGNATURE----- > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---