An update... I can definitely confirm this issue as I have just added
to lib/form/base/BaseCompanyForm.class.php
the following in the setWidgets(array):
'company_name' => new sfWidgetFormInput(),
'company_background' => new sfWidgetFormInput(),

and after adding it and refreshing the page:
http://localhost/myproject/sf_sandbox/web/backend_dev.php/company/editCompany
I can now see the 2 input boxes.

So the question is:
1. Why weren't the entire schema fields used for the form fields in
lib/form/base?
2. I have generated the company module myself (maybe that was the
problem with the forms to begin with?) using the
command 'php symfony generate:module backend company' and I'm reading
that the Forms Book (chapter 4) guides
to use the command 'php symfony propel:generate-crud frontend author
Author' so is that possibly a preferred method?


Regards,
Lir.


On Nov 25, 11:56 pm, lir <[EMAIL PROTECTED]> wrote:
> Hey guys,
>
> I'm taking up the new forms system and learning it... I created my
> config/schema.yml and issued a 'php symfony propel:build-all' which
> built the forms for only one of my tables defined in the schema, and
> only after I issued the 'php symfony propel:build-forms' it created
> the second table.
>
> That's not the odd thing though, what seems to be wrong is the
> BaseCompanyForm.class.php in lib/form/base which is supposed to be
> populated (the widgets I mean) with all the table's fields but it's
> not.
>
> Following is my schema.yml and the mentioned file lib/form/base/
> BaseCompanyForm.class.php
>
> schema.yml:
> // config/schema.yml
> propel:
>   company:
>     id:           ~
>     company_name:       varchar(250)
>     company_backgorund: varchar(250)
>     company_address:    varchar(250)
>     company_website:    varchar(250)
>     created_at:   ~
>     updated_at:   ~
>
>   comment:
>     id:           ~
>     company_id:   ~
>     author:       varchar(250)
>     body:         longvarchar
>     created_at:   ~
>
> BaseCompanyForm.class.php:
> <?php
>
> /**
>  * Company form base class.
>  *
>  * @package    form
>  * @subpackage company
>  * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 8807
> 2008-05-06 14:12:28Z fabien $
>  */
> class BaseCompanyForm extends BaseFormPropel
> {
>   public function setup()
>   {
>     $this->setWidgets(array(
>       'id'                 => new sfWidgetFormInputHidden(),
>     ));
>
>     $this->setValidators(array(
>       'id'                 => new sfValidatorPropelChoice(array
> ('model' => 'Company', 'column' => 'id', 'required' => false)),
>     ));
>
>     $this->widgetSchema->setNameFormat('company[%s]');
>
>     $this->errorSchema = new sfValidatorErrorSchema($this-
>
> >validatorSchema);
>
>     parent::setup();
>   }
>
>   public function getModelName()
>   {
>     return 'Company';
>   }
>
> }
>
> Thanks.
>
> Regards,
> Lir.
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to