Write the JavaScript code as it is displayed below in the text editor.
function HideSection(executionContext)
{
var formContext=executionContext.getFormContext();
var Value=formContext.getAttribute(“sun_hideandshowsections”).getValue();
//Here “sun_hideandshowsections” is a Schema Name of Field.
if(Value != null)
{
if(Value==1)
{
formContext.ui.tabs.get(“General4”).sections.get(“First Section 1”).setVisible(true);
// Here “General4” and “First Section 1” is Names of “Tab” and “Section”.
}
else if(Value==2)
{
formContext.ui.tabs.get(“General4”).sections.get(“First Section 1”).setVisible(false);
}
else if(Value==3)
{
formContext.ui.tabs.get(“General4”).sections.get(“Second Section 2”).setVisible(true);
}
else if(Value==4)
{
formContext.ui.tabs.get(“General4”).sections.get(“Second Section 2”).setVisible(false);
}
else if(Value==5)
{
formContext.ui.tabs.get(“General4”).sections.get(“Third Section 3”).setVisible(true);
}
else if(Value==6)
{
formContext.ui.tabs.get(“General4”).sections.get(“Third Section 3”).setVisible(false);
}
else
{
}
}
}