How to show and hide one choice value based on category selection
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 07:47 AM
If someone select category "A" on the portal then only sub category "X" should be visible.
And if user unselect the category from A to somthing else then sub category "X" should again be hidden,
Please suggestion how to do it
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 08:33 AM
Hi @VIKAS MISHRA, you are only hiding the choice if the category is not Business Application. Can you try the below script lines to display the choice if the category is Business Application.
if (cat != 'Business Application') {
g_form.removeOption('subcategory', 'Costa Loyalty – Poland');
} else {
g_form.addOption('subcategory', 'Costa Loyalty – Poland');
}
Regards,
Sunil