restrict detail view print option

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
Terry
Posts: 4
Joined: 2013-01-08 17:34

restrict detail view print option

Post by Terry » 2015-04-19 20:15

I have 3 member groups levels db_level1 db_level2 and db_level3
For members of group db_level3 I would like to turn off the print preview in the detail view. It is turned off in the table view.
Not sure how to do this?

Has anyone done this?
Thanks

peebee
AppGini Super Hero
AppGini Super Hero
Posts: 352
Joined: 2013-03-21 04:37

Re: restrict detail view print option

Post by peebee » 2015-04-20 00:23

You can use a tablename_init() hook - see here: http://bigprof.com/appgini/help/advance ... ename_init

with "AllowPrinting" DataList object - see here: http://bigprof.com/appgini/help/advance ... s/DataList

Code: Select all

function tablename_init(&$options, $memberInfo, &$args){

	if($memberInfo['group']=='db_level3'){
		$options->AllowPrinting=0;
	}else{
		$options->AllowPrinting=1;
	}
	
	return TRUE;
}

Terry
Posts: 4
Joined: 2013-01-08 17:34

Re: restrict detail view print option

Post by Terry » 2015-04-20 13:51

Thanks for the help. This worked great for the table view. However I am still at a loss on controlling print view option in the detailed view.
I looked at the DataList Object, but not being a php programmer I am confused!
Cheers

Post Reply