mdelrosso / sheepit

SheepIt! Form Cloning plugin for Jquery
http://www.mdelrosso.com/sheepit/
MIT License
68 stars 44 forks source link

How to configure to have a nested form within a nested form, and so on? #16

Open mario60 opened 11 years ago

mario60 commented 11 years ago

I am trying something like the following, but it does not work:

   var addressesForm = $("#person_addresses").sheepIt({
        maxFormsCount: 10,
        nestedForms: [
            {
                id: 'person_addresses_#index#_phones',
                options: { 
                        indexFormat: '#index_phones#',
                        maxFormsCount: 5,
            nestedForms: [
                        {
                                 id: 'person_addresses_#index#_phones_#indexdos#_subs',   <<<<-------- is it Ok?
                options: {
                        indexFormat: '#indexdos_subs#',
                        maxFormsCount: 5
                } } ] } } ] }); });

I like sheepit, and would like to use it. cheers mario