How to Hide a Section in Form for a Particular View
						
					
					
				
			
		
	
			
	
	
	
	
	
Options
			
				
					
	
			
		
	- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
10-10-2024 04:12 AM - edited 10-10-2024 04:14 AM
I have a Request Form which has different views, so for a particular view I want to hide one of the sections in the Form;How should I approach this functionality.
		1 REPLY 1
	
		
		
			
			
			
					
	
			Options
			
				
					
	
			
		
	- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
10-10-2024 04:34 AM
@Niletor You can achiever this by creating an onLoad client script which will trigger on a specific view. To make a client script applicable for a specific view, you need to uncheck the Global checkbox and specify the view name.
Here is an example
Here is the script.
function onLoad() {
    // Get the section name you want to hide
    var sectionName = 'your_section_name'; // Replace with the actual section name
    
    // Hide the section
    g_form.setSectionDisplay(sectionName, false);
}
Hope this helps.
