Hide a Form Section

MStritt
Tera Guru

How do you hide a form section? I've seen some saying to create a client script, but it's based of a specific condition. For example, if the value of this field is true, then hide the section. I don't have any conditions on hiding the section. I just want to hide it all together. Do I still need to create a client script? If so, what would the code look like?

 

Section name: Incident Management

Position: 7

Table: customer_account

1 ACCEPTED SOLUTION

Hi @MStritt Simply you can use onLoad Client Script on Account record/form and use below line of code 

g_form.setSectionDisplay('incident_management', false);

 

 

 

 

 

Regards,

Sid

 

View solution in original post

6 REPLIES 6

Sid_Takali
Kilo Patron
Kilo Patron

Hi @MStritt

To hide your sections is pretty simple. create your UI Policy and give condition like Value is True and make sure to check run Scripts. In your true/false sections add your code:


True:

 

function onCondition() {
g_form.setSectionDisplay('incident_management', true);
}

 

 


False:

 

function onCondition() {
g_form.setSectionDisplay('incident_management', false);
}

 

 

Please mark my answer Correct/Helpful

Regards,

Sid

Hi Sid!

 

What value is true? I just want to hide the section all together. So, as soon as the Account record/form is opened, that section would be hidden. 

Hi @MStritt Simply you can use onLoad Client Script on Account record/form and use below line of code 

g_form.setSectionDisplay('incident_management', false);

 

 

 

 

 

Regards,

Sid

 

Got it. Thanks!