⚠ In case you've missed it we are migrating 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. ⚠


setActionButton not working -> GroceryCrud Enterprise v2.8.7

setActionButton

  • Please log in to reply
1 reply to this topic

#1 aserfozo

aserfozo

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 02 January 2021 - 03:14 AM

Hello

 

I have been working in a new project and using GC Enterprise. The issue that has arisen is that the setActionButton function does not render a button. I am using the given example from the online documentation as is but there is not Avatar button showing after a browser cache clear  and page refresh. The table works flawlessly otherwise. 

 

The code used is directly copied from the example as: $crud->setActionButton('Avatar', 'fa fa-user', function ($row) { return '/view_avatar/' . $row->url; }, true);

 

The only thing I get on the page in the table rows is the edit, more -> view, delete buttons. 

 

complete code is as follows in Codeigniter class

 

$crud = $this->engineModel->getGCE('app');
$crud->setActionButton('Avatar', 'fa fa-user', function ($row) { return '/demo_view_avatar/' . $row->employeeNumber;}, true);
$crud->setApiUrlPath('getInventory');
 
$output = $crud->render();

$this->loadGcView($outputt);

 

using bootstrap v4 theme

 

 

Can anyone help with this please?

Thank You

Andras



#2 aserfozo

aserfozo

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 04 January 2021 - 01:38 AM

Issue resolved. I was adding the button to the incorrect class.. All is working as normal.







Also tagged with one or more of these keywords: setActionButton

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users