On Nov 27, 2:02 am, ken <[EMAIL PROTECTED]> wrote:
> I suggest that you convert your schema using 
> thishttp://www.symfony-project.org/cookbook/1_1/en/alternative_schema

I don't think the verbosity of the schema is the issue here... at
least, I think that mine is pretty verbose.
With that said, I have added the _attributes for phpName directive for
both tables. That doesn't make a change.

> I dont know if the form generator is basing on the schema or the model
> but I strongly suggest that you make your schema definition more
> explicit and also use this combination instead when rebuilding
> everything
>
> symfony propel:build-model
> symfony propel:build-forms
> symfony propel:build-filters

the build-filters command gives me a "task not defined" error.
I ususally just issue a 'symfony propel:build-all'


Further help is most appreciated,
Thanks.


> On Nov 27, 5:43 am, lir <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hey,
>
> > This issue of form classes not building okey is stopping me from
> > continuing in my learning of the framework
> > and following the rest of the documentation.
>
> > Could someone please further advise?
>
> > Thanks,
>
> > On Nov 26, 12:20 am, lir <[EMAIL PROTECTED]> wrote:
>
> > > 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/edi...
> > > 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.- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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