g_form.setDisabled not making checkbox variable grayed out on platform view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2024 05:53 AM
I have on change catalog client script to make checkbox variable grayed out using g_form.setDisabled function.
Same function making checkbox grayed out in portal view but in internal view not working.
Is there any restriction g_form.setDisabled() function don't work on platform view.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2024 02:00 AM
Already tried g_form.setReadOnly(), still same issue working in platform view not in internal view.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2024 02:09 AM
Hi @shikha Gandhi , can you set the UI type to ALL if not already set
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2024 02:44 AM
Ui type already set to all, it's that setdisabled() and setReadonly both are not working on checkbox variable in internal view.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2024 02:12 AM - edited 05-20-2024 02:28 AM
catalog client script attached , same script working for portal but not for desktop. if i use setReadOnly(), it's not working for checkbox variable. however readonly logic if adding to text variable it is working in both view.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2024 09:13 AM
Hi @shikha Gandhi ,
For fields on the form use g_form.setReadOnly('<fieldName>', true);
For catalog variables use g_form.setReadOnly('variables.<variableName>', true);'
Hope this helps to resolve your issue. If it does not, then try to achieve the same through UI Policy.
Thanks & Regards,
Anitha H V