Welcome Guest, Not a member yet? Register   Sign In
CodeExtinguisher v2.0 Release Candidate 12.3
#33

[eluser]abmcr[/eluser]
Another tip (please excuse me.... very beginner)
I have tried to use the editExistingItem method for hooking the editing of a record; in my cntroller i have set this code
Code:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/*
*
* NOTE:
*   This controller does not generate tables, you must predefine you table.
*
*/
include("codexcontroller.php");

class Prova_andrea extends codexController
{
    function Prova_andrea ()
    {
        // Load the CodexController
        codexController::codexController();

        /*
         * ===================================
         * ADDING VALIDATION
         * ===================================
         *
         * If you would like to add form
         * validation, then define your
         * rules in the following format:
         *
         *      $rules['field_name'] = "rules";
         *
         * then in your $config array below:
         *
         *      'rules' => $rules,
         *
         * ===================================
         */
        
        
        $rules['textbox_test'] = "trim|required";
        $messages['edit_success'] = 'Hurray for personalized messages!';

        $config = array(
                    'db_table' => 'andrea', //The name of the table associated with this controller
                    'form_setup' => $this->spyc->YAMLLOAD($this->codexadmin->getDefinitionFileName('prova_andrea_form')), //The array that holds our elements
                    'controller_name' => 'Prova_andrea', //The name of the controller, so that it can be used when generating the URLs
                    'primary_key' => 'id', //The name of the controller, so that it can be used when generating the URLs
                    'display_fields'=>array('textbox_test','textarea_test','date_test'),
                    'order_by'=>'textbox_test',
                    'order_type'=>'desc',
                    'messages' => $messages,
                    'rules'=>$rules
                    );
        $this->setConfig($config);
    }
    
     function editExistingItem(){
            $this->codexadmin->editExistingItem();
            die("ok");
            

            $this->codextemplates->setTitle('Add a new item to: ');
            $this->codextemplates->printHTML();
        }
}
?>
But the ok message of the die() statement not appear... what is wrong?
Another question: the method prepForDelete($id) is called before a record is deleted? I use it as editExistingItem?
Thank you for the patience


Messages In This Thread
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-01-2008, 11:52 PM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-02-2008, 07:12 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-02-2008, 08:41 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-02-2008, 08:43 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-02-2008, 08:53 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-02-2008, 08:54 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-02-2008, 08:58 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-02-2008, 09:07 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-02-2008, 09:17 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-02-2008, 10:34 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-02-2008, 11:18 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-02-2008, 11:21 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-02-2008, 01:08 PM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-02-2008, 01:35 PM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-03-2008, 07:39 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-03-2008, 01:51 PM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-03-2008, 01:55 PM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-04-2008, 11:33 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-04-2008, 11:38 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-05-2008, 05:31 PM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-05-2008, 05:48 PM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-05-2008, 05:50 PM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-05-2008, 06:02 PM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-05-2008, 06:05 PM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-05-2008, 07:31 PM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-08-2008, 05:34 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-08-2008, 08:34 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-08-2008, 09:00 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-08-2008, 09:04 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-08-2008, 09:07 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-08-2008, 09:08 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-09-2008, 02:05 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-09-2008, 06:29 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-09-2008, 06:42 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-09-2008, 09:44 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-09-2008, 09:49 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-09-2008, 09:51 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-09-2008, 09:55 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-09-2008, 09:59 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-09-2008, 10:43 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-10-2008, 10:35 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-10-2008, 10:37 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-10-2008, 02:49 PM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-12-2008, 07:21 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-12-2008, 07:40 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-12-2008, 07:59 AM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-12-2008, 05:16 PM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-12-2008, 05:18 PM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 05-12-2008, 11:17 PM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 02-23-2009, 12:10 PM
CodeExtinguisher v2.0 Release Candidate 12.3 - by El Forum - 03-18-2009, 04:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB