• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
extending CI_form_validation don't work

#3
[eluser]CroNiX[/eluser]
/application/libraries/MY_Form_validation.php

Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class MY_Form_validation extends CI_Form_validation {
    
    public function __construct() {
        parent::__construct();
    }

    public function clear_field_data() {

        $this->_field_data = array();
        return $this;
    }
    
}

Code:
$this->load->library('form_validation');  //loads form validation and extends it with MY_form_validation automatically.
$this->form_validation->clear_field_data(); //call your new method

See the Extending Native Libraries section for more info.


Messages In This Thread
extending CI_form_validation don't work - by El Forum - 03-21-2013, 09:57 AM
extending CI_form_validation don't work - by El Forum - 03-21-2013, 12:25 PM
extending CI_form_validation don't work - by El Forum - 03-21-2013, 05:26 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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