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: 859
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 992 times

pböttcher
AppGini Super Hero
AppGini Super Hero
Posts: 859
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;
		}
	}

User avatar
ronwill
Veteran Member
Posts: 147
Joined: 2015-08-08 10:12
Location: Cheltenham UK +Weatherford USA

Re: hide a field

Post by ronwill » 2019-04-29 12:24

Thanks PB, I was going to ask about this and appreciate you already having provided an answer in here.
Cheers,
Ron
Ron - AppGini Pro V 5.82 Rev 1101
Plugins: Mass Update + Search Page Maker + Summary Reports + Calendar + AppGiniHelper + Udemy Course
Gloucestershire, UK

onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 524
Joined: 2019-05-21 22:42
Contact:

Re: hide a field

Post by onoehring » 2019-07-03 16:48

Hi pbötcher,

I am curious. You suggested something similar ( viewtopic.php?f=2&t=3036 ) to a (from my point of view) similar question.
What is the difference between the code here (and why is this code not in the hooks/tablename _footer-function) and in my question?
I guess one could .hide the section as well.

I am happy about an explanation, but I understand if there are more important things for you. Thanks already anyway.
Olaf
Some postings I was involved, you might find useful:
Backup your database (viewtopic.php?f=4&t=3341); Improve security (viewtopic.php?f=4&t=3168); Field Permissions (viewtopic.php?f=4&t=3308); Custom (error) message (viewtopic.php?f=7&t=1740&p=10871#p10906); Audit Log (viewtopic.php?f=4&t=1369&p=10407); Two Factor Authentication (viewtopic.php?f=7&t=3306&p=11478); Add 2nd SAVE CHANGES button (viewtopic.php?f=2&t=3242&p=11104); Place a search on details view (viewtopic.php?f=2&t=3479&p=12484#p12484); Column-Value-Based-Permissions (viewtopic.php?f=4&t=3498)

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

Re: hide a field

Post by pböttcher » 2019-07-03 21:15

Hi Olaf,

there are multiple ways of getting to the (same) result, so you can choose which one you like most :-).

onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 524
Joined: 2019-05-21 22:42
Contact:

Re: hide a field

Post by onoehring » 2019-07-04 04:07

Hi pbötcher,

thank you, and again I learned a little more about jquery - the .detach seems interesting.
Olaf
Some postings I was involved, you might find useful:
Backup your database (viewtopic.php?f=4&t=3341); Improve security (viewtopic.php?f=4&t=3168); Field Permissions (viewtopic.php?f=4&t=3308); Custom (error) message (viewtopic.php?f=7&t=1740&p=10871#p10906); Audit Log (viewtopic.php?f=4&t=1369&p=10407); Two Factor Authentication (viewtopic.php?f=7&t=3306&p=11478); Add 2nd SAVE CHANGES button (viewtopic.php?f=2&t=3242&p=11104); Place a search on details view (viewtopic.php?f=2&t=3479&p=12484#p12484); Column-Value-Based-Permissions (viewtopic.php?f=4&t=3498)

Post Reply