This topic is locked
[SOLVED]

 hide custom button in view/edit page

10/25/2016 6:06:22 PM
PHPRunner General questions
A
andreas.knab author

Hi Together,

I could need some help.
I can add custom Buttons on list page like described in the help section of phpr. Like this:
[size="2"]Switch to HTML mode in Visual Editor and add wrappers around button's code. Here is the sample code:
{BEGIN MyButton}
<A class="rnr-button button" id="MyButton" href="#" typeid="ib">
MyButton
</A>
{END MyButton}
2. Now in the List page: AfterRecordProcessed event add the following code:
if ($data['exported']!=1)

$record["MyButton"]=true;

[/size]
Is there a way to hide custom Buttons on the view/edit pages too?
Thx for your help!!!

Andreas
PHPR 9 bootstrap mysql

Sergey Kornilov admin 10/26/2016

BeforeDisplay event:

$xt->assign("MyButton", false);


It will also work the same way on all other pages. It is only different for buttons added to the grid because there many of them. For any standalone button the code above will work.

A
andreas.knab author 10/28/2016



BeforeDisplay event:

$xt->assign("MyButton", false);


It will also work the same way on all other pages. It is only different for buttons added to the grid because there many of them. For any standalone button the code above will work.


THX Sergey!