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

185
Views
Agregar repetidor anidado dinámicamente

Tengo un formulario donde el usuario puede agregar múltiples preguntas usando el repetidor y dentro de la pregunta el usuario puede agregar múltiples opciones de entrada. Como los tipos de preguntas son muchos, busco opciones de preguntas a través de ajax y las presento debajo de la pregunta.

Ahora, cuando la opción de pregunta se representa a través de ajax i call, esta es la respuesta html

 <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>

Adjunto este código debajo de la pregunta. Debido a que el complemento de esta solución se está inicializando nuevamente y luego, si hago clic en el botón Agregar, toda la pregunta se repite nuevamente con las opciones desplegables actuales.

¿Hay alguna manera de agregar dinámicamente el repetidor interno e inicializarlo sin afectar al repetidor principal?

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!