How to override choice --None-- with custom value for Glide list field

vishnu vandana2
Kilo Contributor

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.

 

 

11 REPLIES 11

i tried but still --None-- is coming

Aleksandr D_
Kilo Expert

Maybe it will useful for someone.
Regarding forms, we can use the g_form class to disappear --None-- in the choice list.

find_real_file.png
We create client script 'on load' where have such code:

// g_form.removeOption('field', '');

find_real_file.png

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.

find_real_file.png

find_real_file.png