hide a field

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
wferreira
Posts: 6
Joined: 2018-09-14 01:18

hide a field

Post by wferreira » 2019-02-08 00:58

Good night!!!

How to hide a memo field from a group or user?

Att,

Washington Ferreira

pböttcher
AppGini Super Hero
AppGini Super Hero
Posts: 377
Joined: 2018-04-01 10:12

Re: hide a field

Post by pböttcher » 2019-02-08 07:56

Hi,

can you please explain a little more detailed what you try to acheive. Do you want to hide the field in the TableView and/or in the DetailView?

wferreira
Posts: 6
Joined: 2018-09-14 01:18

Re: hide a field

Post by wferreira » 2019-02-08 11:40

the attached image is explaining
Attachments
filed.jpg
filed.jpg (86.17 KiB) Viewed 158 times

pböttcher
AppGini Super Hero
AppGini Super Hero
Posts: 377
Joined: 2018-04-01 10:12

Re: hide a field

Post by pböttcher » 2019-02-08 20:40

Hi,

you can try this in the hooks/<tablename>.php file into the <tablename>_dv function the following:

Code: Select all

	function <tablename>_dv($selectedID, $memberInfo, &$html, &$args){

		if ($memberInfo['group'] == 'GROUPTOHIDE') 
		{
			ob_start(); 
?>
	
			<script>
	
			$j('label[for="Observacao"]').parent().detach();
			</script>
<?php		

			$new_layout = ob_get_contents();
			ob_end_clean();
		
			$html .= $new_layout;
		}
	}

Post Reply