From 08596440a7df1b4ace187f6b6148fd50330198a7 Mon Sep 17 00:00:00 2001 From: NavyasreeBolleboyana <156333434+NavyasreeBolleboyana@users.noreply.github.com> Date: Tue, 14 Oct 2025 19:57:08 +0530 Subject: [PATCH] Create Location.js --- .../Client Scripts/locationChanges/Location.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Client-Side Components/Client Scripts/locationChanges/Location.js diff --git a/Client-Side Components/Client Scripts/locationChanges/Location.js b/Client-Side Components/Client Scripts/locationChanges/Location.js new file mode 100644 index 0000000000..b879472016 --- /dev/null +++ b/Client-Side Components/Client Scripts/locationChanges/Location.js @@ -0,0 +1,17 @@ +function onChange(control, oldValue, newValue, isLoading, isTemplate) { + if (isLoading || newValue === '') { + return; + } + + //Type appropriate comment here, and begin script below + + var loc=g_form.getReference('u_location').state; + alert(loc); + if(loc == 'CA'){ + alert("state is CA"); + g_form.addOption('preferred_language','africa','Africa'); + }else{ + g_form.removeOption('preferred_language','africa'); + } + +}