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