tank Auth set_value undefined in register_form-Collection of common programming errors

I get the following error when click on sign up button.

Fatal error: Call to undefined function set_value() in C:\wamp\www\bdcom\www\application\views\auth\register_form.php on line 19

I am new to codeigniter framework.

following is the code in register_form.php

if ($success){
    echo ''.$success_message.'';
}else {
    //show the form
$use_username = true;
if ($use_username) {
    $username = array(
        'name'  => 'username',
        'id'    => 'username',
        'value' => set_value('username'),

        'maxlength' => $this->config->item('username_max_length', 'tank_auth'),
        'size'  => 30,
    );
}

And this is how I load register.php in auth.php

$this->load->view('auth/register_form', $data);

Have loaded the form helper in autoloader as well. Stuck from 3 days tring to figure out what the problem is. Appreciate the help

Thanks

  1. Check if your autoload.php has the following, if not add them, its due to form helper not being loaded.

    $autoload['helper'] = array('url','form','html');
    
  2. In your constructor of your controller write this:

    $this->load->helper('form');
    

Originally posted 2013-11-09 22:40:34.