We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88f0d5b commit 03dbd8dCopy full SHA for 03dbd8d
Client Scripts/Change Priority field color when it is critical on Incident form/code.js
@@ -0,0 +1,14 @@
1
+function onLoad() {
2
+ // the value of priority
3
+ var priority = g_form.getValue('priority');
4
+
5
+ if (priority == '1') { // for critical
6
+ // Highlight the Priority field in red
7
+ g_form.setFieldStyle('priority', 'background-color', 'red');
8
+ g_form.setFieldStyle('priority', 'color', 'white'); // Optional: change text color for visibility
9
+ } else {
10
+ // Reset to default if not high priority
11
+ g_form.setFieldStyle('priority', 'background-color', '');
12
+ g_form.setFieldStyle('priority', 'color', '');
13
+ }
14
+}
0 commit comments