Note: The topic should be: Show and Hide "inserted button" based on field's value on Grid
Assuming you have inserted custom button (email_reminder_button) on the grid:
Cust_ID | Cust_Name | Email | Account_Balance | email_reminder_button
Custom button codes - "Client Before", "Server" and "Client After" codes will execute the email sending, we will just focus on
how to show and hide the custom button based on the account_balance value on each row of the Grid.
1. Go to PHPR Designer Page.
2. Select the custom button inserted on the grid by clicking on it once.
Then on the right panel, click the ? mark on the right of "item_id" to popup a note page that explains how to use the codes.
3. Since i need to handle the custom button on the grid, i copy the following from the notes and paste to the after record processed event:
Note: there is no need to edit anything, just copy and paste as the notes will automatically grab the right ID for you.
4. At the after record processed event, i can now conditioanlly hide and show the custom button based on the row data values:
// for troubleshooting, echo the row's data (values in the database for the row):
// (disable on production).
$account_balance = $data["account_balance"];
if ( $account_balance < 120 )
5. That's all, the custom buttons will now show and hide based on its row values on list page.
Page 1 of 1
Enable and Disable "inserted button" based on field's value on Grid phpr v 10.1
Page 1 of 1