Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

176
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda