Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

How to hide Select box variable options.

Sachin65
Tera Expert

i need to hide Select box variable options for all users.

(not removing) 

find_real_file.png

5 REPLIES 5

Kamal17
Kilo Sage

Hi Sachin,

You can follow the below steps to achieve your requirement.

1. Create an 'Onload' catalog client script for your catalog item "Standard Laptop".

2. use the below script in the script section.

function onLoad() {
   
	g_form.removeOption('variable_name','T&E');//this would hide T&E option for all users
   
}

Note: You cannot hide options in a select box similar to variables/fields in a form. Instead you have to use removeOption() & addOption() functions to show/hide necessary options in a select box.

Mark Correct if this solves your issue. Hit Like/Helpful based on the impact.

Regards,

Udhay