Jump to content


okyrahmanto

Member Since 01 Sep 2018
Offline Last Active Sep 06 2018 08:41 AM
-----

Posts I've Made

In Topic: Setting Default Value for Hidden Field

01 September 2018 - 06:48 AM

Hi Jhonny

 

i was trying for using default value for hidden fieldtype

 

i was use it easily with grocery crud comunity

 

public function kontrak_barang() {
        //
        $id_kontrak = $this->uri->segment(3);
        $crud = $this->_getGroceryCrudEnterprise();
        $crud->setTable('tb_kontrak_barang');
        $crud->setSkin('bootstrap-v4');
        $crud->fieldType('id_kontrak','hidden',$id_kontrak); // this where i struggling beacuse the result always 0
        $crud->setRelation('id_barang','tb_barang','nama_barang');
        $crud->where(['tb_kontrak_barang.id_kontrak = ?' => $id_kontrak]);
        $output = $crud->render();
        $this->_exe_output($output);
    }

 

 

but it doesn't work with enterprise version

can you tell me how to do it right?

sorry for bad english  :)