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 ?
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.
that’s the answer ! Thanks @nasrul 
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…
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…
Well, i you add setUniqueId here >> Install Grocery CRUD Enterprise in Laravel | Grocery CRUD - A PHP CRUD Generator Library i think it will be enough. setUniqueId should’ve been used from the start, just like $crud->setCsrfTokenName('_token') and $crud->setCsrfTokenValue(csrf_token()) 
Thanks @johnny , i solved this problem by using setUniqueId. But if there is any better way, why not 
yes @johnny , your second blind guess is right. I will always use setUniqueId now. Thank’s 
well, this is weird. I clear cache & cookies and now it works fine.
i found the problem. Turns out it because my column name is “product_name”. I changed it to “name”, and now it show the data. Why is that?
Yeah, this solution work for me @johnny , thank you 