Remove Choice list option(none) from drop down.

Kusuma2
Kilo Guru

Hello Team,

I have the variable severity which is choice list field.I want to remove the option none (custom value) as there is already OOB --None--.

find_real_file.png

In this   process I deleted the choice none is there is no option to keep it inactive.

find_real_file.png

But my problem here is even though it is deleted it is appearing in the drop down list.May I know what is reason . I even tried with onload script remove option but no luck.Can you please help me to get rid of this issue.

Regards,

Ajay.

16 REPLIES 16

Sharique Azim
Kilo Sage

Hi Ajay,



You can simply set the default value as None, the choice dropdown without none should be selected.


Use a client script on change to remove the choice none, g_form.removeOption('field', 'None');


Tried but not working.. Any Ideas.   Done   it with g_form.removeOption('severity','5'); bUT NO LUCK


find_real_file.pngB


find_real_file.png


Hi ajay, perhaps the variable name is incorrect in your code? Can you check the variable name and update the code. The below code should be the correct one. Just update to correct variable name...



g_form.removeOption('severity','5')


yes,


g_form.removeOption('severity','5') should work.



btw the script should be onchange type.