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

239
Views
Adding multiple field in different rows(only one button is working to add field and rest are not working)

enter image description here

<script> 
//[adding button][1] 
 $(document).ready(function(){  
      var i=1;  
      $('#add').click(function(){  
           i++; 
          $('#dynamic_field').append('<tr id="row'+i+'"><td><input value="<?php echo $c['date']; ?>" type="date" class="form-control" name="date[]" ></td>
<td><input value="<?php echo $c['text']; ?>" type="text" class="form-control" name="text[]"></td>
<td><button type="button" name="remove" id="'+i+'" class="btn btn-danger btn_remove">X</button><button type="button" name="save" id="'+i+'" class="btn btn-primary btn_save">save</button></td></tr>');  
       });  
      $(document).on('click', '.btn_remove', function(){  
           var button_id = $(this).attr("id");   
           $('#row'+button_id+'').remove();  
      });  
    
});  
 </script>


  

only one button is working to add field and rest are not working

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!