Remove Choice list option(none) from drop down.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2017 05:05 AM
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--.
In this process I deleted the choice none is there is no option to keep it inactive.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2017 05:17 AM
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');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2017 06:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2017 06:46 AM
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')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2017 07:14 AM
yes,
g_form.removeOption('severity','5') should work.
btw the script should be onchange type.