How to override choice --None-- with custom value for Glide list field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2019 04:44 AM
For an glide list field we have created choices. For that field we want to override choice label "--None--" with custom label.
Please help us on the same .
Thanks in Advance.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2019 01:57 AM
i tried but still --None-- is coming
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2021 02:08 PM
Maybe it will useful for someone.
Regarding forms, we can use the g_form class to disappear --None-- in the choice list.
We create client script 'on load' where have such code:
// g_form.removeOption('field', '');
But in this case with instead --None-- we will have the next 'choice' (next variant in the choice list) in the chosen field ('Email' in my example).
In this situation, we can use script 'on load' where have such code:
// function onLoad() {
// if (g_form.getValue('field') == '') {
// g_form.removeOption('field', '');
// g_form.setValue('field', '');
// } else {
// g_form.removeOption('field', '');
// }
// }
After that, --None-- disappeared and the field will be empty.