Elijah Aromola
Mega Sage

You're only clearing the value when there isn't a new value. When the field is erased there is still a value there. Make the following changes to your code.

 

if (isLoading) {
  return;
}

 

AND 

if (newValue == ""){


g_form.clearValue('u_advisor_number');
g_form.clearValue('u_advisor_region');
g_form.clearValue('u_advisor_district');
g_form.clearValue('u_district_manager');

}

 

Please mark this as helpful is this resolved your question.

View solution in original post