From 9dcb0826760002af3a1a56b5f4607e92c9dbc94f Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Mon, 30 Mar 2020 14:29:56 +0200 Subject: [PATCH] Shortening the "Prototype" paragraph --- form/form_collections.rst | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/form/form_collections.rst b/form/form_collections.rst index d5d26a873eb..9c26cd70efa 100644 --- a/form/form_collections.rst +++ b/form/form_collections.rst @@ -242,16 +242,13 @@ great, your user can't actually add any new tags yet. Allowing "new" Tags with the "Prototype" ---------------------------------------- -Allowing the user to dynamically add new tags means that you'll need to -use some JavaScript. Previously you added two tags to your form in the controller. -Now let the user add as many tag forms as they need directly in the browser. +Previously we added two dummy tags to our task in the controller. +Now let the users add as many tag forms as they need directly in the browser. This will be done through a bit of JavaScript. -The first thing you need to do is to let the form collection know that it will -receive an unknown number of tags. So far you've added two tags and the form -type expects to receive exactly two, otherwise an error will be thrown: -``This form should not contain extra fields``. To make this flexible, -add the ``allow_add`` option to your collection field:: +But first, we need to let the form collection know that instead of exactly two, +it will receive an *unknown* number of tags. This is done with the +``allow_add`` option:: // src/AppBundle/Form/TaskType.php