Jump to content


Soreno

Member Since 02 Oct 2019
Offline Last Active Today, 09:18 PM
-----

Posts I've Made

In Topic: Unable to load the requested class: Grocery_CRUD

17 January 2020 - 07:04 PM

Hello, rkrajnik.
Try

$config = include(APPPATH . 'config/gcrud-enterprise.php');

 


In Topic: Don't find field in setRelation with where clause

17 January 2020 - 03:41 PM

Hello, nunenthal.

Try this

$crud->setRelation('dossier_id', 'dossier', 'nom_dossier', ['user_id' => $client_id]);

In Topic: unsetBootstrap() causes more function to no longer work

20 December 2019 - 04:36 PM

Hi, drinkingwine.
When you use unsetBootstrap() you need to add into the crud output php file both .css and .js files.


In Topic: Insert Account number on Add

20 November 2019 - 10:19 PM

Hello, drinkingwine.

Try to create private variable in you class than set your id value in it and use it in callbackAddForm function.

class YourController extends CI_Controller {

    private $accountId = 0;

    public function YourFunction($id)
    {
        ...
        $this->accountId = $id;
        
        $crud->callbackAddForm(function ($data) {
            $data['account'] = $this->accountId;
            return $data;
        });
        ...
    }

}

 


In Topic: Insert Account number on Add

17 October 2019 - 03:45 PM

 

Hello Soreno,

Thank you for your help. I added the setRelation and the loading hang has stopped.

However, there are no records found. If I comment out the setRelation then records are found.

 

I wrote setRelation parameters as an example. I don't know your DB structure, so if you need it, you must insert your own parameters.