How would I maintain dynamic form HTML after failed validation? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: How would I maintain dynamic form HTML after failed validation? (/showthread.php?tid=59433) |
How would I maintain dynamic form HTML after failed validation? - El Forum - 10-04-2013 [eluser]Unknown[/eluser] I'm trying to make a page for creating invoices and there are a series of input arrays. Of course I don't know how many invoice lines will be required from the getgo so I'm using Javascript to append more lines as needed. Once I submit the invoice form I do the validation and if it fails I want to be able to maintain the dynamic state of the page, but as it is right now it just resets back to the default state of the view. Here's a snip of my code. View: Code: <tbody> Controller: Code: public function submit() Javascript (JQuery): Code: $('#lineAdd').click(function() { Hope someone can help. Thanks for any info! |