Hi I've a problem with form on Doctrine.

This is my problem, I've a schema like this :

Schema:
Page:
  columns:
    title:   { type: string(255), notblank: true }
    content: { type: text, notblank: true }

Tag:
  columns:
    name:  { type: string(255), notblank: true }

PageTag:
  columns:
    page_id: { type: integer, primary: true }
        tag_id:  { type: integer, primary: true }
        rank:    { type: integer }
        color:
          type:    enum
          values:  [red, green]
          default: red
          notnull: true
  relations:
    Page: { onDelete: CASCADE, local: page_id, foreign: id }
        Tag:  { onDelete: CASCADE, local: tag_id, foreign: id }

Fixtures:
Tag:
  t1:
    name: Symfony
  t2:
    name: Doctrine
  t3:
    name: PHP

And I would like make a form, where I create my page and associate 0
to 2 tags max, with them rank and color, added with Ajax button.
a Form like this:
New Page:
title: '<input page_title>'
content: '<textarea page_content>'

Tags: '<button add tag with AJAX>'
Tag 1: '<button delete tag with AJAX>'
name: '<select tag_id => tag_title>'
color: '<select tag_color>'
rank: '<managed with a sortable list in AJAX>'
'<other tags added>'

How can I do this? With embedded forms, change relations in sxhema
doctrine, or else?

Mathieu T.
--~--~---------~--~----~------------~-------~--~----~
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 
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