How to show and hide one choice value based on category selection

VIKAS MISHRA
Tera Contributor

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

SunilKumar_P
Giga Sage

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