inputs created by jQuery "on the fly" will disappears if you go back to correct errors

inputs created by jQuery "on the fly" will disappears if you go back to correct errors

Hi

I created few inputs on the fly with jQuery. but if an error cought on php side then you have to go back to correct errors they all disappears. I can see the problem and why it is caused. but how can I fix this issue? is there a trick to keep them when i click go back?


here is how I add those input fields

  1. //append fields
  2. for(var i = inUseTotalCheck+1; i <= totalToUse; ++i){
  3. $('#checkListPanel').append(
  4. '<div class="label-input" id="check_' + i + '">' +
  5. '<input type="text" id="checknumber_' + i + '" name="checkNumber[]" value="" style="width: 120px;" placeholder="Check number..." />' +
  6. '<input type="text" id="amount_' + i + '" name="checkAmount[]" value="" style="width: 120px;" placeholder="Check amount..." />' +
  7. '<input type="text" id="checkDate_' + i + '" name="checkDate[]" value="" style="width: 120px;" readonly="true" /> ' +
  8. '</div>'
  9. );
  10. }
Thanks