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

153
Views
Show/Hide fields (Conditional Logic) is not working in repeater field in php javascript

I have 3 radio buttons let's say A,B,& C. when i click on the B a new section will come having some other form fields. and most important part is that i have to append/ repeat the entire part by an add more button and the whole functionality is as previous. but in the append filed the show hide function is not working.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

It is better to show a code snippet so it is easy for us to guide you. But try this code. Register the click event of the button using $(document).on('click', 'element', function);

$(function(){
 $('#btnAddMore').on('click', function(){
        $(".repeater").append($('.template').html()); 
 });
 
  $(document).on('click', '[data-containerId="alertme"]', function(){
    alert("Hello world!");  
  });
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="template">
   <input type="submit" data-containerId="alertme" value="alert me" />
</div>
<div class="repeater">

</div><div>
  <button id="btnAddMore">add more</button>
</div>

about 4 years ago · Juan Pablo Isaza Report
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!