Welcome Guest, Not a member yet? Register   Sign In
Return back values to view if any error in form fields
#2

(This post was last modified: 04-04-2017, 12:21 PM by PaulD.)

It is well documented here in form_validation library docs:
https://www.codeigniter.com/user_guide/l...g-the-form

And here in the form_helper helper docs:
https://www.codeigniter.com/user_guide/h...#set_value

Basically, if your input name is 'user_name' you repopulate the value using something like:

PHP Code:
<input type="text" name="user_name" value="<?php echo set_value('user_name', ''); ?>" /> 

Where the second value is the default value, commonly blank.

Paul.
Reply


Messages In This Thread
RE: Return back values to view if any error in form fields - by PaulD - 04-04-2017, 12:17 PM



Theme © iAndrew 2016 - Forum software by © MyBB