Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

180
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda