⚠ In case you've missed it we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This forum is read-only and soon will be archived. ⚠


Member Since 01 Oct 2019
Offline Last Active May 18 2020 04:28 PM

Topics I've Started

Change output on add/edit

07 January 2020 - 07:36 PM

What is the best approach to change the format of the input fields when add/edit is selected?


I'd like to place "First Name", "Last Name" etc on the same line, and change styles etc.


thanks in advance




setTexteditor() in multi grid

17 December 2019 - 03:21 PM

In the public function clients_management, I have setup a setActionButton with an action of "chart".

$crud->setActionButton('Chart', 'fa fa-user', function ($row)
{ return '/index.php/clients/chart/' . $row->first_name . ' ' . $row->middle_name . ' ' . $row->last_name . ' : Account No. ' . $row->account;}, false);


Function chart defines two grids, notes and psa.


public function chart($id) {
$crud = $this->_getGroceryCrudEnterprise();

$output = $crud->render();

$crud2 = $this->_getGroceryCrudEnterprise();
$output2 = $crud->render();

$output->output .= '<br/>' . $output2->output;



First grid, notes


public function notes($id) {
$uncode_id = urldecode($id);
$pos = strpos($uncode_id, "No.");
$account_from_string = substr($uncode_id,$pos+4);
$this->autofill_accountId = $account_from_string;
$this->autofill_updated_at = date("Y-m-d - H:m");
$this->autofill_created_at = date("Y-m-d - H:m");
$this->accountId = $id;
$crud = $this->_getGroceryCrudEnterprise();


$crud->where(['notes.account' => $account_from_string]);
$crud->setSubject('a note for ' . $uncode_id);
$crud->displayAs('updated_at','Last Update')
->displayAs('title','Type of Note')
$crud->callbackAddForm(function ($data) {
$data['account'] = $this->autofill_accountId;
$data['created_at'] = $this->autofill_created_at;
$data['updated_at'] = $this->autofill_updated_at;

return $data;});
$output = $crud->render();


When i add or edit a record, with setTexteditor set, the form does nothing. Clicking on add or edit just keeps the same grid up.


Any ideas?

Do I have to use some callback function?


Thanks in advance.



unsetBootstrap() causes more function to no longer work

16 December 2019 - 06:47 PM

Using the unsetBootstrap() causes the more function to no longer work.

If I add to the crud output php file, the style cdn, https://stackpath.bo...tstrap.min.css, the styles are there but again, more function no longer works.

When I uncomment the unsetBootstrap the more function works.



Insert Account number on Add

15 October 2019 - 02:40 PM

Hello Folks,


I'm very new to CRUD and have, what I hope is a simple question.

When I press the ADD button, the fields in the table are displayed.

I add button calls the controller/function and passes a record number for the column Account

I would to fill in this number on the add screen.


Please see the attached screen grabs.


Thanks in advance.




Examples - Multigrid

01 October 2019 - 05:04 PM

When I do an add offices on the example for multigrid, the record is written to the database, but the screen remains on the add record page. 


I'm using MAMP pro and have the config.php set as follows


$config['base_url'] = 'http://crud:8888/';

$config['index_page'] = 'index.php';


I cleared browser cache and still have the issue.




Thanks in advance