Catalog item variables to add and remove option manually

Kushi test
Tera Contributor

Hello everyone

Thanks in advance

I have i requirements in which i have to create a variable named as application in which i can add or remove option manually from the field is new choice came to add or remove.

Just wanna ask the step how to create that variable and what technically steps need to be followed to create such field?

2 REPLIES 2

SoniaShridhar13
Giga Guru

@Kushi test  Hi! 

You would need to get the value (var myVar1 = g_form.getValue('variable_name'); ) and then remove based on the value of that variable (if myVar1 != whatever { g_form.removeOption('variable_name2', 'choice_value';).  Make sure you use the Choice value, and not its display value.

Hello @SoniaShridhar13 requirements is that customer want to edit that fields as per their convience without raising any incidents they want the functionality if the can manually add a value in that variable and delete also