How to hide fields on a form from users but keep them active in the background for automation?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2024 05:53 AM
Hi,
I am trying to hide fields on a form as the fields do not need to be visible to users, they are there for automation purposes only so they just need to be hidden from users. I have been unsuccessful in doing this via a UI Policy. These are true/false fields.
Can this be done using a client script or business rule?
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2024 02:56 AM
Hi @thrsdy1512
You should be able to do it via UI Policy itself which is the recommended way. Still, if you are facing issues, you can do it via Catalog Client Scripts as well. Use g_form.setDisplay('name of the field',false); inside your client script.
Thanks & Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2024 03:06 AM - edited 02-02-2024 03:08 AM
Hello @thrsdy1512 -
Please try using below onload client script:
function onLoad() {
// Replace 'name_of_the_field' with the actual name of the field
g_form.setDisplay('action_required', false);
}
Please Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Thanks,
Pratiksha