CodeIgniter Forums
Keep input value if form validation is wrong - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Keep input value if form validation is wrong (/thread-45510.html)



Keep input value if form validation is wrong - El Forum - 09-24-2011

[eluser]Unknown[/eluser]
Hi there,

I'm new to CodeIgnitor.

I've starting with forms.

In PHP I would add the following to an input value:

Code:
<?php if($_POST['name']) {

echo $_POST['name'];

} ?>

That way if the form input has an error then it doesn't all disappear on form submission

Is there any similar I can use when using the form helper?