Skip to content
This repository was archived by the owner on Dec 12, 2021. It is now read-only.

How To: Add multiples fields with one click

lest edited this page Sep 18, 2012 · 3 revisions

Using javascript events you could add multiple fields with one click, e.g. add 3 fields at once:

jQuery(function ($) {
  $(document).on('nested:fieldAdded', function (event) {
    for (var n = 2; n; n--) {
      event.field.clone().insertAfter(event.field);
    }
  });
});

Clone this wiki locally