- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2015 07:24 AM
The picture below shows what I've done to get a field highlighted based on the fields value
I have a feeling that I may have got the syntax wrong as this field is a string and not an integer/choice field.
I would welcome any feedback.
TIA
Solved! Go to Solution.
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2015 07:58 AM
Angus,
Use the below code:
function onChange(control, oldValue, newValue, isLoading) {
var cTypeLabel = $('label.incident.contact_type');
var cTypeField = $('incident.contact_type');
if (newValue == 'Self Service') {
cTypeLabel.setStyle({backgroundColor: "red"});
cTypeField.setStyle({color: "red"});
}
else {
cTypeLabel.setStyle({backgroundColor: ""});
cTypeField.setStyle({color: ""});
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2015 08:08 AM
MMm.. that's weird. Would you mind sharing an screenshot of the current state of your field style?
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2015 08:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2015 08:26 AM
Thanks Angus! I was referring to the screenshot of the page where we are defining the style . The same one you shared when you entered this post.
The objective is to check if we can observe anything that may still have to be changed on your condition or in your style.
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2015 08:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2015 08:33 AM
MMm.. Yes. That one. And that's not displaying a blue circle next to the contact type when it is Site Surgery? Keep in mind this styles will only work in the list view . To do it within a form, you will need to do an onload or onchange client script that will modify the element style.
Thanks,
Berny