This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » symfony 1.3 and 1.4 » Form for many-to-many relation with extra field
Form for many-to-many relation with extra field [message #100784] Fri, 11 June 2010 11:17 Go to next message
FunFR  is currently offline FunFR
Messages: 1
Registered: June 2010
Junior Member
I have a problem with making a form to edit a many-to-many relation with extra field.

Here is my schema.yml

Application:
  actAs: { Timestampable: ~ }
  columns:
    name:         { type: string(255), notnull: true, unique: true }
  relations:
    Properties:
      class: Property
      refClass: ApplicationProperty
      local: application_id
      foreign: property_id
      foreignAlias: Applications

Property:
  actAs: { Timestampable: ~ }
  columns:
    name:    { type: string(255), notnull: true, unique: true }

ApplicationProperty:
  actAs: { Timestampable: ~ }
  columns:
    id: { type: integer, primary: true, autoincrement: true }
    application_id: { type: integer, notnull: true }
    property_id:   { type: integer, notnull: true }
    value:         { type: string(255), notnull: true }
  relations:
    Application: { onDelete: CASCADE, local: application_id, foreign: id }
    Property:    { onDelete: CASCADE, local: property_id, foreign: id }


I want to assign new preperties to my application with a certain value but the form that is generate by Symfony is a simple multiple select field and it did not permit to assign a value to the extra field.

I am searching a standard way of making a form with extra field and many-to-many relation ?
Re: Form for many-to-many relation with extra field [message #102559 is a reply to message #100784 ] Thu, 15 July 2010 23:57 Go to previous message
petersaints  is currently offline petersaints
Messages: 10
Registered: March 2010
Location: Portugal
Junior Member
Yes I want also to be able to fill a field when I select a connection on a double select list or something, that is present in a many to many table in a schema similar to yours.

Any idea on how to achieve that?

[Updated on: Thu, 15 July 2010 23:59]

Previous Topic:[SOLVED] Help with Doctrine and I18n Fields
Next Topic:configuring component slots
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software