File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -308,6 +308,10 @@ prototype_options
308308
309309**type **: ``array `` **default **: ``[] ``
310310
311+ .. versionadded :: 6.1
312+
313+ The ``prototype_options `` option was introduced in Symfony 6.1.
314+
311315This is the array that's passed to the form type specified in the `entry_type `_
312316option when creating its prototype. It allows to have different options depending
313317on whether you are adding a new entry or editing an existing entry.
@@ -317,12 +321,12 @@ on whether you are adding a new entry or editing an existing entry.
317321 // ...
318322
319323 $builder->add('names', CollectionType::class, [
320- 'entry_type' => TextType::class,
321- 'entry_options' => [
322- 'help' => 'You can edit this name here.',
324+ 'entry_type' => TextType::class,
325+ 'entry_options' => [
326+ 'help' => 'You can edit this name here.',
323327 ],
324328 'prototype_options' => [
325- 'help' => 'You can enter a new name here.',
329+ 'help' => 'You can enter a new name here.',
326330 ],
327331 ]);
328332
You can’t perform that action at this time.
0 commit comments