Call to undefined function fuel_nav() in global.php

edited April 2012 in Modules
I followed the same method of controllers as that of blog/settings but i am getting error as fuel_nav() undefined

Comments

  • edited 8:27AM
    Could you provide a little more information or recreation steps to help debug?
  • edited 8:27AM
    This is my controller

    <?php
    require_once(FUEL_PATH.'/libraries/Fuel_base_controller.php');

    class example1 extends Fuel_base_controller {
    public $nav_selected = 'example1';

    function __construct()
    {
    parent::__construct();
    $this->config->module_load('example1', 'example1');
    $this->_validate_user('example1');
    }

    function index()
    {
    $this->load->module_model(EXAMPLE_FOLDER, 'example');
    $this->js_controller_params['method'] = 'add_edit';

    $field_values = $this->example->find_all_array_assoc('number');

    if (!empty($_POST['example1']))
    {
    // format data for saving
    $save = array();
    foreach($field_values as $field => $value)
    {
    $example1 = $this->input->post('example1', TRUE);
    $val = (isset($example1[$field])) ? $example1[$field] : '';
    $save[] = array('number' => $field, 'value' => trim($val));
    }
    $this->example->save($save);
    $this->session->set_flashdata('success', lang('data_saved'));
    redirect($this->uri->uri_string());

    }

    $this->load->library('form_builder');

    $fields = array();
    $fields['number'] = array();
    $fields['date'] = array();
    $fields['time'] = array();
    $fields['invoiceno'] = array();
    $fields['invoicedate'] = array();

    $this->form_builder->label_layout = 'left';
    $this->form_builder->form->validator = &$this->example->get_validation();
    $this->form_builder->use_form_tag = FALSE;
    $this->form_builder->set_fields($fields);
    $this->form_builder->display_errors = FALSE;
    $this->form_builder->name_array = 'example1';
    $this->form_builder->submit_value = 'Save';
    $this->form_builder->set_field_values($field_values);


    $vars = array();
    $vars['form'] = $this->form_builder->render();
    a$vars['warn_using_config'] = !$this->config->item('blog_use_db_table_settings');

    $this->_render('example1', $vars);

    }

    }
  • edited 8:27AM
    What is the URI to this page and do you have a route in place for it? Is it at least getting to the constructor method?
Sign In or Register to comment.