Onchange client script - select box variable

J_31
Kilo Sage

J_31_0-1701230035454.png

I want to create a onchange catalog client script for State/Market variable.

 

if the value of state/market is choosen as "texas" and value of Do you need to set it up as is  "standard_tx"

 

I need to add option to care manager type/skills variable. 

 

I created a onchange client script for variable - state/market , but its not working:

function onChange(control, oldValue, newValue, isLoading) {
    if (isLoading || newValue == '') {
        return;
    }
    if ((newValue == 'texas') && (g_form.getValue("do_you_need_to_be_set_up_as") == "standard_tx")) {
       
        g_form.addOption('care_mgr_type', 'bx', "bexardemo");

    }
    //Type appropriate comment here, and begin script below

}

 

10 REPLIES 10

choices are around, 200 in count. I am able to get it using client scripti. hope this is the best way or I am not sure if this acheivable through script include.