post by JDodd on Jan 7, 2022

I need to show the button only if there is something in the “web” field.

The below does not work. How does one access data in the row array inside of a controller in this new version?

if ($row->web){
$crud->setActionButton(‘Web’, ‘fa fa-plus’, function ($value,$row) {return $row->web;},true);
}

post by johnny on Jan 8, 2022

Hello @JDodd ,

Unfortunately this is not available in Grocery CRUD and I can’t think of any work-around for this. When you are adding a set action button it is for all the rows.

Regards
Johnny

post by JDodd on Jan 8, 2022

Johnny, thanks for your reply. Too bad row data is not unavailable inside the controller.
I will still use Grocery CRUD for back end data maintenance, but just went ahead and wrote the front end in PHP.

post by mariel_alberto on Jan 8, 2022

Hello
Then go to the second alternative, create the button in a callbackcolumn.

It’s crazy but it’s a small solution

post by JDodd on Jan 8, 2022

Mariel thanks for your help, but I don’t know much about this program and find it is just easier to write applications with PHP, Ajax, etc.
One thing I found frustrating is all the information I found on the internet applies to the old version, and this new one is completly different.

1 year later

post by regumsoft on Apr 14, 2023

8 months later

post by dodo.selusin on Dec 4, 2023

1 / 7
Jan 2022