in case you still need it setDefaultState | Grocery CRUD - A PHP CRUD Generator Library
Hello @johnny , i confirm this not work with the latest version of GCE (V3.1.4). I just update my GCE using “composer update --prefer-dist” and my input mask not working anymore. I try to replace my GCE with the old one, and it working again. Any solution for this ?
In search and input form, my date format is dd/mm/yyyy, but when it showed in column, it became m/d/yyyy. How to make it so the format is the same ?
[image]
i used this for date input :
$crud->fieldType('tanggal', 'native_date');
I can create callbackColumn function to make column format dd/mm/…
The problem is : my password is changing because i’'m getting a new license. If you’re having the same problem, change password manually in C:\Users<username>\AppData\Roaming\Composer\auth.json (Windows) with a new one, and your problem will be solved.
Hello @johnny , i try to update my old code with composer, and i got this :
could not be fully loaded (Invalid credentials (HTTP 401) for 'https://composer.grocerycrud.com/packages.json', aborting.), package information was loaded from the local cache and may be out of date
Why it not ask for my u…
Yes, there is a direct way. I solve this problem using this :
$crud->where(['parameter' => array('aa', 'bb', 'cc', 'dd')]);
I think this should be included in the documentation.
Hello. How to use or where in GCEnterprise ?
like this one.
that’s the answer ! Thanks @nasrul 
Hello. How to use callbackBeforeInsert with parameter ?
Example :
Public function($id1, $id2){
$crud->callbackBeforeInsert(function ($stateParameters) {
// i wanna use $id1 and $id2 here, but didn’t work
return $stateParameters;
});
}
wow ! your blind guess work like a charm
Thank’s @johnny
i did used callbackEditField and callbackAddField to create something like that.
first, i set addField :
$crud->addFields([''parameter', 'terukur', 'satuan']);
Then i set terukur field hidden.
Then i use callbackAddField to create terukur and satuan inline like this :
[image]
but when i click…
is it possible to create inline form like this with GCE ?
[image]
i said update @johnny not upgrade
it’s update from v 3.0.15 to 3.0.16.
But i’m not sure this is happened after GCE update or crome update.
Never mind, $crud->fieldType(‘fieldName’, ‘native_date’); solved my problem. I preffer to use this date picker. HTML date picker now is awesome 
Thank’s @johnny @nasrul , after i remove this line :
// We removed the line $data['fk_id_invoices'] = session('master_id');
and using callbackBeforeInsert that you suggested, it works !
But why this example not using callbackBeforeInsert ?
Which example are you referring to ? this one ?
yes @nasrul , fk_id_invoices inserted to database.
[image]
fk_id_invoices should be 1.
also, please see this video.
yes john, it should be like this. But that didn’t work for me. Look at this video.
this is my code :
public function index()
{
$crud = $this->_getGroceryCrudEnterprise();
$crud->setTable('kal_invoices');
$crud->setUniqueId('kal_invoices');
$crud->unsetCssTheme();
$crud->unsetExport();
$crud->unsetPrint();
//$crud->where(…
Yes, that works for me. Thank you @johnny
Woow that’s very good news. Now we don’t have to download and replace every update @johnny 
Finnaly.. i found slow internet and tested it. It works, i can use it on all my view. Thanks @nasrul
Yeah, i never thought about that too. But some of my clients still use very slow internet connection, and i just found the same data inserted by my client with just 1 sec time difference. From my experience, it caused by slow internet connection. So when they click save button, insert process is so…
Hello @johnny , so i try to input data using GCE from slow internet. I fill the form, and click save 10 x. And it inserts data 10 x. It should be just inserted one times.
So my question is, how to prevent multiple times insert with gce ?