File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -211,16 +211,14 @@ yet to add new tags or delete existing ones.
211211Allowing "new" Tags with the "Prototype"
212212----------------------------------------
213213
214- Allowing the user to dynamically add new tags means that you'll need to
215- use some JavaScript. Previously you added two tags to your form in the controller.
216- Now let the user add as many tag forms as they need directly in the browser.
217- This will be done through a bit of JavaScript.
218-
219- The first thing you need to do is to let the form collection know that it will
220- receive an unknown number of tags. So far you've added two tags and the form
221- type expects to receive exactly two, otherwise an error will be thrown:
222- ``This form should not contain extra fields ``. To make this flexible,
223- add the ``allow_add `` option to your collection field::
214+ Previously you added two tags to your task in the controller. Now let the users
215+ add as many tag forms as they need directly in the browser. This requires a bit
216+ of JavaScript code.
217+
218+ But first, you need to let the form collection know that instead of exactly two,
219+ it will receive an *unknown * number of tags. Otherwise, you'll see a
220+ *"This form should not contain extra fields" * error. This is done with the
221+ ``allow_add `` option::
224222
225223 // src/Form/TaskType.php
226224
You can’t perform that action at this time.
0 commit comments