How to hide choices from choice list using client script onchange
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2017 11:46 PM
How to hide choices from choice list using client script onchange, i want to hide few choices in subcategories when category is changed, i tried using g_form.removeOption('subcategory', '7'); but no luck, how to solve this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2017 01:21 AM
If your using subcategory as dependent field to category,you have to uncheck that. that;s the reason it is not removing when I tested in personal dev. i unchecked dependent field on subcategory and this code is wrkg fine
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var getCategory = g_form.getValue('category');
alert(getCategory);
if(getCategory=='software')
{
alert('insde');
g_form.removeOption('subcategory','os');
}
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2017 04:27 AM
I want both functionalities.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-27-2017 08:27 PM
I have same requirement with you, have you resolved your problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-27-2017 08:28 PM
If you solved your problem, could you share with your solution?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2017 12:54 AM
Hi Swathi,
Did you get the solution? If yes, can you please post it here.
Regards,
Dedeepya