How to hide field in a form in Custom view

Mehar Naaz1
Tera Contributor
I want to hide "Template" field in Location vie but i want "Template" field to be in default view. Can anyone suggest how to achieve this?
2 ACCEPTED SOLUTIONS

Anubhav24
Mega Sage
Mega Sage

Hi @Mehar Naaz1 ,

You can uncheck the Global checkbox on UI Policy , then View field is visible there you can specify the view where you want to hide this specific field

View solution in original post

AnveshKumar M
Tera Sage
Tera Sage

Hi @Mehar Naaz1 

You can create an onLoad client script and Uncheck the Global check box and set the view name in the View field. and use the script to hide the field.

 

function onLoad() {
	g_form.setVisible('YOUR_FIELD_NAME', false);
   
}

 

AnveshKumarM_0-1696492886953.png

 

Please mark my answer helpful and accept as solution if it helped 👍✔️

Thanks,
Anvesh

View solution in original post

3 REPLIES 3

Sohithanjan G
Kilo Sage
Kilo Sage

Hi @Mehar Naaz1 ,

When creating UI Policy, in When to Apply - > uncheck the global & add view on which view you need the UI policy should work (meaning in which view you wanted to hide).

The same functionality is available in Client Scripts as well 🙂

Sohith1_0-1696492757387.png

 

Please mark my answer as Accepted Solution if it suffice the requirement & please hit helpful button

Please mark as Accepted Solution if this solves your query and HIT Helpful if you find my answer helped you. This will help other community mates too..:)

Anubhav24
Mega Sage
Mega Sage

Hi @Mehar Naaz1 ,

You can uncheck the Global checkbox on UI Policy , then View field is visible there you can specify the view where you want to hide this specific field

AnveshKumar M
Tera Sage
Tera Sage

Hi @Mehar Naaz1 

You can create an onLoad client script and Uncheck the Global check box and set the view name in the View field. and use the script to hide the field.

 

function onLoad() {
	g_form.setVisible('YOUR_FIELD_NAME', false);
   
}

 

AnveshKumarM_0-1696492886953.png

 

Please mark my answer helpful and accept as solution if it helped 👍✔️

Thanks,
Anvesh