We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06e7c5f commit 8931249Copy full SHA for 8931249
reference/forms/types/collection.rst
@@ -179,7 +179,9 @@ you need is the JavaScript:
179
var emailCount = '{{ form.emails|length }}';
180
181
jQuery(document).ready(function() {
182
- jQuery('#add-another-email').click(function() {
+ jQuery('#add-another-email').click(function(e) {
183
+ e.preventDefault();
184
+
185
var emailList = jQuery('#email-fields-list');
186
187
// grab the prototype template
@@ -192,9 +194,7 @@ you need is the JavaScript:
192
194
193
195
// create a new list element and add it to the list
196
var newLi = jQuery('<li></li>').html(newWidget);
- newLi.appendTo(jQuery('#email-fields-list'));
-
197
- return false;
+ newLi.appendTo(emailList);
198
});
199
})
200
</script>
0 commit comments