The CreatorCon Call for Content is officially open! Get started here.

how to make other option hidden when selected a specific option in a catalog item variable

phr
Tera Contributor

Hi All,

'I have a requirement where there's a list collector in which when the below highlighted option is selected  , all other options has to be hidden expect one specific option in a catalog item.

Attaching the image for reference.

phr_0-1717871189739.png

When "GitHub Co-Pilot (cost : 19 €/month)" is selected then the rest has to be hidden expect "GitHub Enterprise (cost : 14 €/month)" .

How to achieve this?

 

4 REPLIES 4

Kris Moncada
Tera Guru

Hi @phr ,

 

Have you tried using UI Policies?

Sid_Takali
Kilo Patron

Hi @phr As Kris suggested Try UI Policy and add condition Service Required is GitHub Co-Pilot (cost : 19 €/month)

and in Actions make all your variables Visible false. Make onLoad checkbox true.

phr
Tera Contributor

Hi @Sid_Takali ,

 

Since i need to make a variable list collector hiden when once specific option is selected. I used the catalog client script and made use of removeOption(). But it isn't working as my variable field type is list collector.

I am not able to achieve this in the UI policies as it is for the same variable field ..the dropdown option muct be hidden when one of the dropdowns is selected

Example: For Service required variable has many dropdowns, on selecting the option "GitHub Co-Pilot (cost : 19 €/month) " i need only "GitHub Enterprise (cost : 14 €/month)" and rest all options should be hidden.

phr_0-1717944645796.png

The below highlighted options should be removed as shown below.

phr_1-1717944778625.png

ie on selecting the dropdown option "GitHub Co-Pilot (cost : 19 €/month)" , i need to see only this option in the dropdown "GitHub Enterprise (cost : 14 €/month)"

phr_2-1717944873841.png

How to achieve this?

 

 

phr
Tera Contributor

Hi @Kris Moncada ,

 

I tried UI policies but since i need to make an option hidden when one specific option is selected from the same variable "service required" which is of the list collector. I wasn't able to achieve this.

Since i need to make a variable list collector hiden when once specific option is selected. I used the catalog client script and made use of removeOption(). But it isn't working as my variable field type is list collector.

I am not able to achieve this in the UI policies as it is for the same variable field ..the dropdown option muct be hidden when one of the dropdowns is selected

Example: For Service required variable has many dropdowns, on selecting the option "GitHub Co-Pilot (cost : 19 €/month) " i need only "GitHub Enterprise (cost : 14 €/month)" and rest all options should be hidden.

phr_0-1717945106816.png

 

The below highlighted options should be removed as shown below.

phr_1-1717945107357.png

 

ie on selecting the dropdown option "GitHub Co-Pilot (cost : 19 €/month)" , i need to see only this option in the dropdown "GitHub Enterprise (cost : 14 €/month)"

phr_2-1717945107142.png

 

How to achieve this?