• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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 : ''));


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.