File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -242,16 +242,13 @@ great, your user can't actually add any new tags yet.
242
242
Allowing "new" Tags with the "Prototype"
243
243
----------------------------------------
244
244
245
- Allowing the user to dynamically add new tags means that you'll need to
246
- use some JavaScript. Previously you added two tags to your form in the controller.
247
- Now let the user add as many tag forms as they need directly in the browser.
245
+ Previously we added two dummy tags to our task in the controller.
246
+ Now let the users add as many tag forms as they need directly in the browser.
248
247
This will be done through a bit of JavaScript.
249
248
250
- The first thing you need to do is to let the form collection know that it will
251
- receive an unknown number of tags. So far you've added two tags and the form
252
- type expects to receive exactly two, otherwise an error will be thrown:
253
- ``This form should not contain extra fields ``. To make this flexible,
254
- add the ``allow_add `` option to your collection field::
249
+ But first, we need to let the form collection know that instead of exactly two,
250
+ it will receive an *unknown * number of tags. This is done with the
251
+ ``allow_add `` option::
255
252
256
253
// src/AppBundle/Form/TaskType.php
257
254
You can’t perform that action at this time.
0 commit comments