Data dependant setActionButton

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);

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.


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.

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

It’s crazy but it’s a small solution

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.