post by CodeGC on Aug 16, 2023

i am using Grocery CRUD Enterprise v3.0.10 , with CodeIgniter 4
i think there a bug when trying to make column invisible.

$crud->fieldTypeColumn(‘requiredDate’, ‘invisible’); not working the column still shown.
also $crud->fieldType(‘requiredDate’, ‘invisible’); also not working..
i think also on the example on the documentaion it is show the column (attached the snapshot)

post by johnny on Aug 18, 2023

13 days later

post by johnny on Sep 1, 2023

post by CodeGC on Sep 2, 2023

2 months later

post by Phil on Oct 18, 2023

Hi,
I’m having the same issue with 3.0.13

tried:
$crud->fieldTypeColumn(‘creation_date’,‘invisible’)
$crud->fieldTypeColumn(‘creation_date’,‘hidden’)
$crud->fieldType(‘creation_date’,‘invisible’)
$crud->fieldType(‘creation_date’,‘hidden’)

is it possible that the bug came back?
also, what’s the difference between hidden and invisible?

thanks
Phil

post by johnny on Oct 19, 2023

Hello @Phil ,

Please make sure that you have also cleared your cache. I have instructions of how to do that here: https://support.essensys.tech/en/articles/4490678-delete-app-cache-google-chrome

Please let me know if after removing your localStorage cache fixed the problem.

The difference between ‘invisible’ and ‘hidden’ is that ‘invisible’ is actually a field that is getting into the response of the API that Grocery CRUD is using. The frontend though is hiding it. For example it can be used for JavaScript callbacks.

On the other hand ‘hidden’ is not displayed at all in the API calls but it can be used for callbacks. For example to use it in callbackColumn | Grocery CRUD - A PHP CRUD Generator Library or it can be used in callbackInsert where you would like to add insert a field that is not in the form.

If this confuses you, in short, more or less ‘invisible’ and ‘hidden’ for the user is exactly the same.

Regards
Johnny

post by Phil on Oct 19, 2023

yes, it worked thanks :+1:
any way to “not caching” things while developing?
I was thinking about using something like

$string = bin2hex(openssl_random_pseudo_bytes(10));
$groceryCrud->setUniqueId($string);

only when I’m trying different things without keep clearing the cache every time.
any drawbacks other then not keeping column widths/visibility/filters between refresh?

post by johnny on Oct 19, 2023

Hello @Phil ,

You can add the configuration remember_state_upon_refresh to false and there will be no cache at all. Very good for development. If this is to false then in every refresh it will not store any data like filtering/columns/ordering… e.t.c.

Regards
Johnny

post by Phil on Oct 26, 2023

any hint on why setting the column type to “invisible” will correctly hide it but using “hidden” the column will show?
GCEnterprise 3.0.13

thanks

1 / 9
Aug 2023