Welcome Guest, Not a member yet? Register   Sign In
Validation v/s Form_Validation
#11

[eluser]Yash[/eluser]
Code:
$data['title'] = $row->title;

set_value('title',$title);


in my case just
Code:
$this->validation->title=value;
and view will take it automatically I mean no need of a variable. You can set value directly to input using validation lib.

There is nothing wrong but my case looks more clean then setting variable.
#12

[eluser]ontguy[/eluser]
Code:
$data['title'] = $row->title;

set_value('title',$title);
The set_value could be replaced with this:
In the controller just set it once on an empty POST then check if is set in the view:
Code:
set_value('title', isset($title) ? $title : ''));




Theme © iAndrew 2016 - Forum software by © MyBB