- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2022 12:59 AM
please help me to display the select box values based on another select box in a catalog item form.
For example I want to write catalog client script of type onchange because when I select Neurologist in select box so available doctors should be those only whose specialization is Neurologist.
Solved! Go to Solution.
- Labels:
-
Studio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2022 01:09 AM
Hi Priya,
You would require onchange client script on the select item variable; sample script below, just adjust or tweat as per your values:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading) {
return;
}
g_form.clearOptions('request_type');
if(newValue == 'Card Swipe Unit'){
g_form.addOption('request_type', choicevalue, choiceLabel);
g_form.addOption('request_type', choicevalue, choiceLabel);
}
}
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2022 01:29 AM
Hi
Please write catalog client script of type onchange field on "Select your required specialization"
For example:-
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
// return;
}
var specialization = g_form.getValue('Select your required specialization');
g_form.clearOptions('select_docter');
if (newValue == 'darmatologists') {
g_form.addOption('select_docter', choicevalue, choiceLabel);
g_form.addOption('select_docter', choicevalue, choiceLabe2);
}
}
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy.
Thanks,
Ram