I’d like to use forms generated by propel
( propel:generate-module –with-show –non-verbose-templates frontend user users )
but I’d like do modify them a little bit. e.q. I’d like to remove fields that are foreign keys. Is it possible, or do I have to create my own forms?
EDIT
in file: project_name/lib/form/form_file.class.php there is an empty class which derives from some base class. If put there something like this:
$this->setWidgets(array(
'name' => new sfWidgetFormInput()
));
All the default fields disappear and there is only this ‘name’ field in the form, which is not what I’m looking for.
If you are using admin generator as you indicated, you can edit your forms via a generator.yml file. With this file you can do any number of things include set which widgets you want to appear, order of entry, actions, etc.
The generator.yml file is located in /apps/app_name/modules/module_name/config
You can read more about it in the symfony docs.
— Edit —
If you are not using the generator.yml file, you can edit the form class directly, read this article relating to symfony forms for more info.
Example widget manipulation: