Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

175
Views
Add Nested repeater dynamically

I have a form where user can add multiple questions using repeater and inside the question the user can add multiple input option. As the question types are many so I'm fetching questions options through ajax and rendering it under the question.

Now when the question option are rendered through ajax i call, this is the html response

<div class="inner-repeater">
    <div data-repeater-list="inner-list">
        <div data-repeater-item>
            <div class="form-group">
                <label>Dropdown Answer</label>
                <input type="text" name="dropwdown[]"
                       placeholder="Member will be able to choose one option"
                       class="form-control question_answer">

            </div>
            <a href="javascript:void(0);"  data-repeater-delete>Remove Dropdown option</a>

        </div>
    </div>
    <div class="form-group">
        <div class="col p-0">
            <button class="btn btn-primary"  data-repeater-create type="button"><i
                    class="os-icon os-icon-folder-plus"></i>
                Add Dropdown option
            </button>
        </div>
    </div>

</div>
<script>
    $(".repeater-a").repeater({

        repeaters: [{
            // (Required)
            // Specify the jQuery selector for this nested repeater
            selector: '.inner-repeater'
        }],

    });
</script>

I append this code under the question. due to this solution plugin is being initialized again and then if i click on add button the whole question is repeated again with current dropdown options.

Is there a way to dynamically add the inner repeater and initialize it without effecting the main repeater

URL - https://github.com/DubFriend/jquery.repeater/

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!