@@ -257,7 +257,7 @@ The first thing we need to do is to let our form collection know that it will
257
257
receive an unknown number of tags. So far we added two and the form type
258
258
expects to receive two as well otherwise an error will be thrown:
259
259
``This form should not contain extra fields ``. For this we add the ``'allow_add' ``
260
- option to our collection field.
260
+ option to our collection field::
261
261
262
262
// src/Acme/TaskBundle/Form/Type/TaskType.php
263
263
namespace Acme\TaskBundle\Form\Type;
@@ -297,7 +297,7 @@ a new tag at the time we save the todo and its tags together.
297
297
298
298
The ``allow_add `` option also does one more thing. It will add a ``data-prototype ``
299
299
property to the ``div `` containing the tag collection. This property
300
- contains html to add a Tag form element to our page like this:
300
+ contains html to add a Tag form element to our page like this::
301
301
302
302
<div data-prototype="<div><label class=" required">$$name$$</label><div id="khepin_productbundle_producttype_tags_$$name$$"><div><label for="khepin_productbundle_producttype_tags_$$name$$_name" class=" required">Name</label><input type="text" id="khepin_productbundle_producttype_tags_$$name$$_name" name="khepin_productbundle_producttype[tags][$$name$$][name]" required="required" maxlength="255" /></div></div></div>" id="khepin_productbundle_producttype_tags">
303
303
</div>
@@ -307,7 +307,7 @@ new Tag forms. To make things simple, we will embed jQuery in our page
307
307
as it allows for more simple cross-browser manipulation of the page.
308
308
309
309
First let's add a link on the ``new `` form with a class ``add_tag_link ``.
310
- Everytime this is clicked by the user, we will add an empty tag for him.
310
+ Everytime this is clicked by the user, we will add an empty tag for him::
311
311
312
312
{% extends "::base.html.twig" %}
313
313
{% block body %}
@@ -343,7 +343,7 @@ the form elements when the link is clicked.
343
343
It is better to separate your javascript in real js files than
344
344
to write it inside the HTML as we are doing here.
345
345
346
- Our script can be as simple as this:
346
+ Our script can be as simple as this::
347
347
348
348
<script>
349
349
function addTagForm() {
0 commit comments