How to Hide a Section in Form for a Particular View

Niletor
Tera Contributor

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

Sandeep Rajput
Tera Patron
Tera Patron

@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

Screenshot 2024-10-10 at 5.02.33 PM.png

 

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.