Assuming the below schema..  I am doing the following:

Within Campaign , I am showing a record, and within, I am showing a
form for addressbook. So how can I get the name of the Campaign I am
in, so that I can set it automatically into the form for AddressBook ?

Something like..

... hide the campaign_id for addressbookform
... processForm...   addressbook->campaign_id = Current campaign beeing viewed.


I hope this makes sense..

Thank you.

Organization:
  columns:
    id:
      primary: true
      unique: true
      type: integer
      notnull: true
      autoincrement: true
    sf_guard_user_id:
      type: integer(4)
    name:
      unique: true
      type: string(255)
      notnull: true
    first_name:
      type: string(255)
    last_name:
      type: string(255)
    phone:
      type: string(255)
    email:
      type: string(255)
    logo:
      type: string(255)
    is_active:
      default: true
      type: boolean
      notnull: true
  indexes:
    IX_Organization_1:
      fields: [is_active]
    IX_Organization_2:
      fields: [id]
  relations:
    sfGuardUser:
      foreign: id
      local: sf_guard_user_id
      owningSide: true
      type: one
      foreignType: one
Campaign:
  columns:
    id:
      primary: true
      unique: true
      type: integer
      notnull: true
      autoincrement: true
    organization_id:
      type: integer
      notnull: true
    name:
      unique: false
      type: string(255)
      notnull: true
    description:
      type: blob(0)
    is_active:
      default: true
      type: boolean
      notnull: true
  indexes:
    IX_Campaign_1:
      fields: [id]
    IX_Campaign_2:
      fields: [is_active]
  relations:
    Organization:
      local: organization_id
      foreign: id
AddressBook:
  columns:
    id:
      primary: true
      unique: true
      type: integer
      notnull: true
      autoincrement: true
    first_name:
      type: string(255)
    last_name:
      type: string(255)
    mobile:
      type: string(20)
    phone:
      type: string(255)
    email:
      type: string(255)
    is_active:
      default: true
      type: boolean
      notnull: true
    campaign_id:
      type: integer
  relations:
    Campaign:
      local: campaign_id
      foreign: id

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.

Reply via email to