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
308
308
309
309
**type **: ``array `` **default **: ``[] ``
310
310
311
+ .. versionadded :: 6.1
312
+
313
+ The ``prototype_options `` option was introduced in Symfony 6.1.
314
+
311
315
This is the array that's passed to the form type specified in the `entry_type `_
312
316
option when creating its prototype. It allows to have different options depending
313
317
on 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.
317
321
// ...
318
322
319
323
$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.',
323
327
],
324
328
'prototype_options' => [
325
- 'help' => 'You can enter a new name here.',
329
+ 'help' => 'You can enter a new name here.',
326
330
],
327
331
]);
328
332
You can’t perform that action at this time.
0 commit comments