Skip to content

Commit 7569cf4

Browse files
committed
Minor tweaks
1 parent 629ec50 commit 7569cf4

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

reference/forms/types/collection.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff 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+
311315
This is the array that's passed to the form type specified in the `entry_type`_
312316
option when creating its prototype. It allows to have different options depending
313317
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.
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

0 commit comments

Comments
 (0)