Hide Table View and Give Detail View Only
Posted: 2021-04-12 02:29
Is there a way to hide table view for users and only view the first or selected record of the table in detail view only?
There is a way to hide table view for a group but that doesn't let the user to view the record if he presses back or goes to home screen.
That method is putting this in hooks/tablename.php for the init function as the below code block
Wanted_Group is the group we target
tablename is the table we hide
But my use case is to hide or disable the access to the table and only able to view the selected record in detail view. There needs to be a link on the home page to redirect to that record.
How can we do it?
There is a way to hide table view for a group but that doesn't let the user to view the record if he presses back or goes to home screen.
That method is putting this in hooks/tablename.php for the init function as the below code block
Wanted_Group is the group we target
tablename is the table we hide
Code: Select all
function tablename_init(&$options, $memberInfo, &$args) {
if ($memberInfo['group'] == 'Wanted_Group')
{
$options->AllowCSV = 0;
$options->RecordsPerPage = 1;
$options->HideTableView = 1;
}
return TRUE;
}
How can we do it?