how to make the choices red and green in a select box variable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2022 10:46 PM
8 REPLIES 8

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2022 10:57 PM
Hi @Nihar2
You can try below script for the same:
g_form.getOption("fieldname", "option_value").style.color = "color value";
Best Regards
Aman Kumar
Aman Kumar
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2022 11:32 PM
This code is not working for me.
g_form.getOption("testcolors", "green").style.backgroundColor = "green";
g_form.getOption("testcolors", "red").style.color = "#ff0000";
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2022 11:34 PM

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2022 12:20 AM
Note: getControl doesn't work in portal
Best Regards
Aman Kumar
Aman Kumar