Skip to content

Commit 0859644

Browse files
Create Location.js
1 parent 02eaef8 commit 0859644

File tree

1 file changed

+17
-0
lines changed
  • Client-Side Components/Client Scripts/locationChanges

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
2+
if (isLoading || newValue === '') {
3+
return;
4+
}
5+
6+
//Type appropriate comment here, and begin script below
7+
8+
var loc=g_form.getReference('u_location').state;
9+
alert(loc);
10+
if(loc == 'CA'){
11+
alert("state is CA");
12+
g_form.addOption('preferred_language','africa','Africa');
13+
}else{
14+
g_form.removeOption('preferred_language','africa');
15+
}
16+
17+
}

0 commit comments

Comments
 (0)