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

Complicated nested form with height depth level #348

Open
ipkes opened this issue Jan 19, 2015 · 0 comments
Open

Complicated nested form with height depth level #348

ipkes opened this issue Jan 19, 2015 · 0 comments

Comments

@ipkes
Copy link

ipkes commented Jan 19, 2015

I have a problem with complicated form, which can contain several nested forms (which can contain height depth level).
Field data-blueprint contain excess fields, from another nested fields.

  window.nestedFormEvents.insertFields = function(content, assoc, link) {
   - var target      = $(link).data('target')
   + var target = $(link).data('target'),
   +     tmp    = '<div class="fields">';
   + $(content).children()
   +           .filter('input[name*='+assoc+'], div[class*='+assoc+'], div[class=fields], a[data-association='+assoc+']')
   +           .each(function(i, element){ tmp += element.outerHTML; })
   + content = tmp + '</div>'
    if (target) {
      return $(content).appendTo($(target));
    } else {
      return $(content).insertBefore(link);
    }
  }

It's works for me, and may be helps you.

@ipkes ipkes changed the title Complicated nested form with Complicated nested form with height depth level Jan 21, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant