Hello guys,
J'utilise des formulaires imbriqués et ça marche nickel mais ce qui est bizarre est qu'à chaque fois que je veux personnaliser le formulaire ou les formulaires l'update ne se fait plus et je sais pas pourquoi peut etre vous aurez une idée la dessus.
Voici mon schema.yml
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
 
Annexe:
  connection: doctrine
  tableName: annexe
  columns:
    id_annexe:
      type: integer(4)
      fixed: false
      unsigned: false
      primary: true
      autoincrement: true
    is_activated:
      type: boolean
      fixed: false
      unsigned: false
      primary: false
      default: 0
      notnull: true
    updated_at:
      type: timestamp(25)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
   created_at:
      type: timestamp(25)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
  relations:
    Board:
      local: id_annexe
      foreign: id_annexe
      type: many
Board:
  connection: doctrine
  tableName: board
  columns:
    id_annexe:
      type: integer(4)
      fixed: false
      unsigned: false
      primary: true
     autoincrement: false
  id_board:
      type: integer(4)
      fixed: false
      unsigned: false
      primary: true
      autoincrement: false
    updated_at:
      type: timestamp(25)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
   commentaire:
      type: string(1000)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
  relations:
    Annexe:
      local: id_annexe
      foreign: id_annexe
      type: one
   CodeLine:
      local: id_annexe
      foreign: id_annexe
      type: many
   CodeLines:
      class: CodeLine
      local: id_board
      foreign: id_board
      type: many
CodeLine:
  connection: doctrine
  tableName: code_line
  columns:
    id_annexe:
      type: integer(4)
      fixed: false
      unsigned: false
      primary: true
      autoincrement: false
    id_board:
      type: integer(4)
      fixed: false
      unsigned: false
      primary: true
      autoincrement: false
   id_code_line:
      type: integer(4)
      fixed: false
      unsigned: false
      primary: true
      autoincrement: false
   description:
      type: string(1000)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
   commentaire:
      type: string(1000)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
  relations:
    Board:
      local: id_annexe
      foreign: id_annexe
      type: one
   Board_3:
     class: Board
     local: id_board
     foreign: id_board
     type: one
  TDetails:
     local: id_annexe
     foreign: id_annexe
     type: many
  TDetails_2:
    class: TDetails
    local: id_board
    foreign: id_board
    type: many
  TDetails_3:
    class: TDetails
    local: id_code_line
    foreign: id_code_line
    type: many
Apres dans BoardForm je fais une imbrication de Codeline
Code : Sélectionner tout - Visualiser dans une fenêtre à part
$this->embedForm('CodeLines', new CodeLinesForm($this->object))
et la j'arrive à avoir toutes mes lignes qui composent mon tableau Board. Maintenant si j'utilise echo $form j'ai mon formulaire et je peux faire une mise à jour de mes objets seulement si je decide de personnaliser le formulaire dans _form.php en utilisant le code suivant l'update ne marche plus:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
<?php foreach ($form['codelines'] as $line) : ?>
      <?php echo $line['description']->renderRow(); ?>
        <? endif; ?>
SVP I REALLY NEED HELP!!!!