Skip to profile content
Thanks Johnny, but fieldTypeColumn method didn’t work for me, but the fieldType did the (quick filter) trick I need. $crud->fieldType('your_field_name', 'string');
Unfortunately my own view cannot be in my project directory because themeView method uses _viewsPath internaly and it search for a view inside src/GroceryCrud/Views/ directory :frowning:
I’ve noticed that quick filtering INT (or BIGINT) columns behaves differently than quick filtering CHAR (or VARCHAR) and other types (like FLOAT). It seems to me that GCE uses WHERE col LIKE '%val%' for filtering CHAR, VARCHAR, FLOAT and other types and WHERE col = val for INT/BIGINT, DECIMAL and p…
I would like to know if it is possible to configure the export as PDF button for producing a landscape page by default. I know that we can use the print functionality for this, but the format (has borders) is uggly this way. TIA.
Yes. No error with true.
That’s right. Removed (since the the clear filter button in yellow helped a lot).
I’m having a lot of difficulty debugging this situation. In my vanilla installation of GCE (for testing purposes) everything works normally. But in production, using a custom bootstrap theme, the error appears. Nothing in the logs… the only thing that appears different in the network tab is two 303…
Hi, Johnny! Unfortunately it didn’t work for me. I’m getting error “We can’t process the response of the server. Not well JSON formatted response.” only when the new remember_filters_upon_refresh is set to false. Could you assist me in debugging it more? The message that follows is not very useful… …
@johnny I have also noticed the following error while quick filtering in the $fieldName column relative to setRelationNtoN(), even without the where parameter: CRITICAL - 2023-10-01 17:51:58 --> SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the …
Take a look here and tell us if this is what you want.
I would like to know if it is possible to use setRelation() with the main table pk several times. Suppose I have: A user table with ‘id’ as pk. A table named auth_identities containing user’s email associated with every user via user_id fk. Another table named auth_groups_users contains the user…
I can confirm this @johnny, and I’ll be using +20 characters to tell you how I’ve tested it… I’m using CodeIgniter 4.4.1 and GCE v3.0.12. I’ve followed the docs available here and tested with your own example database. To my surprise the example didn’t work out-of-the-box because the in ‘examples_…
The definitive way to verify the version installed You can simply check the change log file in: “vendor\grocery-crud\enterprise\change-log.txt” or the composer.json file (same folder). I don’t know if this is the ‘definitive’ way… How an update should be performed? I’m assuming it is simpler …
Is it possible for the PHP configuration option “remember_state_upon_refresh” to prevent the columns’ visibility, order, and width from being reset? We definitely need the option to reset/clear filters, default ordering and paging, but I find it really annoying to reconfigure columns visibility, col…
Just to let everyone know that this is now possible with GCE >= v3.0.10. So we can use several where clauses one after another (like in the example above). Thanks @johnny…
@johnny How can we customize the Quill text editor presented in Grocery CRUD Enterprise modal dialogs (add, edit)? I would like to add elements to the toolbar and load additional Quill modules… TIA.
Whoa, that’s amazing! Thank you! I will test this version ASAP and report back if I found any issues.
I think you are now using Quill editor in v3, right @johnny? Could you please enable the alignment option for us in the next version? modules: { toolbar: [ [{ 'align': null}, {'align': 'center'}, {'align': 'right'}, {'align': 'justify'}], ['image', 'code-block'] ] }, TIA.
There where clause syntax is described here with examples like that: $crud->where([ 'customers.country > ?' => 'USA' ]); $crud->where([ 'customers.country >= ?' => 'USA' ]); $crud->where([ 'customers.country < ?' => 'USA' ]); $crud->where([ 'customers.country <= ?' => 'USA' ]); $cru…
If you have previously completed the composer wizard steps, then simply place your recently downloaded (zip) archive into the artifacts folder and execute the following commands in order to update GCE to a new version: composer update php spark publish
Can I change the default text editor in GCE v3? I really need a text editor with better formatting options like e.g. paragraph alignment. Is there anything I can do to show such options in CKEditor? TIA.
Hi @iradave ! using the [ and ] does not work - it throws a ParseError: syntax error, unexpected token “=”, expecting “]” $crud->setRelation('ParentCompanyID','company','{Name} (ID:{CompanyID} IsParent:{IsParent})',[IsParent = '1']); This is not a GCE issue, it is an invalid PHP syntax for an …
I’m getting the error below while using a mysql/mariadb view as table: // mysql view "table" $crud->setTable('view_name'); // "primary key" on view $crud->setPrimaryKey('id', 'view_name'); I know Johnny that you’ve corrected this bug previously for the ‘add’, ‘edit’ and ‘delete’ operations. Cou…
Hi, Johnny! I will take your “example/customers” view and “Example.php” controller (customers table) as example :slight_smile: and add the following lines: use Laminas\Db\Sql\Where; public function customers() { ... $where = new Where(); $where->notLike('country', '%USA%'); …
Hi, John! How difficult is to add a groupBy() method to GCE? It would be a nice companion to defaultOrdering(). Thanks.
Which DBMS are you using (MySQL, MariaDB, Postgres…)? Datetime fields should appear like this (in your language/format, of course): [image] I’m using GCE v3.0.9.
Hi, John! Just to let you know that if we $crud->setRead() and have a field type set with $crud->fieldType('description', 'texteditor') then the Read Modal is showing all the HTML tags like this: <p>Exclusive t-shirt.</p><p>Can be customized to your liking.</p> But the Edit Modal properly shows t…
You can use the callbackAddField() method, although I think it is overkill for such a simple task. $crud->callbackAddField('input_field_name', function () { return '<input class="form-control" name="input_field_name" type="number" value="1" max="100" min="1" placeholder="101" />'; });
I think the where clause should be cumulative, i.e. the library could use an array internally ($_where = ) in the case we need to add a new where clause after another, say, according to a user permission or group. There are several other clauses that can stack… $crud->where(['user_id' => $id]); if…
Is there any callback I can use to append $uploadPath or $publicPath to the auto generated filename? If I didn’t store $uploadPath or $publicPath how can I retrieve the uploaded image outside GCE pages?