CodeIgniter Forums
How to repopulate form inputs (arrays) - 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 to repopulate form inputs (arrays) (/showthread.php?tid=14658)



How to repopulate form inputs (arrays) - El Forum - 01-10-2009

[eluser]RS71[/eluser]
Hello

I was wondering on how I might be able to repopulate inputs with array names.

Something like this:

Code:
<input type="text" name="tel[]" value="" id="tel" class="inputtext tel"  />

(I am currently using form helpers to create the inputs.)

Another question:

Lets say I have 2 default inputs like the ones above but more identical ones are created dynamically via jQuery. What would be the most effective way to make it so that the dynamic inputs created reappear in case of validation failure (with their inputted values)?

Thanks in advance.