Skip to content

Commit b658a3a

Browse files
iammichielweaverryan
authored andcommitted
Correcting typos.
1 parent f387f11 commit b658a3a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

reference/forms/types/collection.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ they'll be added seamlessly to the array of items. This is great in theory,
107107
but takes a little bit more effort in practice to get the client-side JavaScript
108108
correct.
109109

110-
Following along with the previous example, suppose that you start with two
110+
Following along the previous example, suppose you start with two
111111
emails in the ``emails`` data array. In that case, two input fields will
112-
be rendered that will look something like this (depending on the name of
112+
be rendered that will looking like this (depending on the name of
113113
your form):
114114

115115
.. code-block:: html
@@ -124,19 +124,19 @@ and - via JavaScript - render another field with the name ``form[emails][2]``
124124
To help make this easier, setting the `prototype`_ option to ``true`` allows
125125
you to render a "template" field, which you can then use in your JavaScript
126126
to help you dynamically create these new fields. A rendered prototype field
127-
will look something like this:
127+
will look like this:
128128

129129
.. code-block:: html
130130

131131
<input type="email" id="form_emails_$$name$$" name="form[emails][$$name$$]" value="" />
132132

133-
By replacing replacing ``$$name$$`` with some unique value (e.g. ``2``),
133+
By replacing ``$$name$$`` with some unique value (e.g. ``2``),
134134
you can build and insert new HTML fields into your form.
135135

136136
Using jQuery, a simple example might look like this. If you're rendering
137-
your collection field all at once (e.g. ``form_row(form.emails)``), then
137+
your collection fields all at once (e.g. ``form_row(form.emails)``), then
138138
things are even easier because the ``data-prototype`` attribute is rendered
139-
automatically for your (with a slight difference - see note below) and all
139+
automatically for you (with a slight difference - see note below) and all
140140
you need is the JavaScript:
141141

142142
.. configuration-block::
@@ -162,7 +162,7 @@ you need is the JavaScript:
162162
</form>
163163

164164
<script type="text/javascript">
165-
// keep track of how many email fields ahve been rendered
165+
// keep track of how many email fields have been rendered
166166
var emailCount = '{{ form.emails | length }}';
167167

168168
jQuery(document).ready(function() {

0 commit comments

Comments
 (0)