CodeIgniter Forums
How to repopulate form inputs (arrays) - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: How to repopulate form inputs (arrays) (/showthread.php?tid=14658)

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


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

Something like this:

<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.