Conditional format of fields
Hello, what a graet solution for sharepoint!
I have a small question. I have a very importend field (yes/no field) - I will highlight the field until the field is checked. The field has a own css class (fontsize and bold). Also I have created a additional css style .highlighted which should handle the background color.
In JS editor I have creates a small handler. But it dosn't work. Here is my code: Have you a suggestion?
Thank you
RAB
function entrycompletehandler() {
//var status = fd.field('Title').value();
if (fd.field('Eingang_x0020_vollst_x00e4_ndig').value()) {
fd.field('Eingang_x0020_vollst_x00e4_ndig').control()._el().addClass('highlighted');
}
}
fd.field('Eingang_x0020_vollst_x00e4_ndig').change(function()
{
entrycompletehandler();
});
entrycompletehandler();
I have a small question. I have a very importend field (yes/no field) - I will highlight the field until the field is checked. The field has a own css class (fontsize and bold). Also I have created a additional css style .highlighted which should handle the background color.
In JS editor I have creates a small handler. But it dosn't work. Here is my code: Have you a suggestion?
Thank you
RAB
function entrycompletehandler() {
//var status = fd.field('Title').value();
if (fd.field('Eingang_x0020_vollst_x00e4_ndig').value()) {
fd.field('Eingang_x0020_vollst_x00e4_ndig').control()._el().addClass('highlighted');
}
}
fd.field('Eingang_x0020_vollst_x00e4_ndig').change(function()
{
entrycompletehandler();
});
entrycompletehandler();
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hi,
You need to add class to the title of the field:
You need to add class to the title of the field:
Code: Select all
function entrycompletehandler() {
if (fd.field('Eingang_x0020_vollst_x00e4_ndig').value()) {
fd.field('Eingang_x0020_vollst_x00e4_ndig').title()._el().addClass('highlight');
} else {
fd.field('Eingang_x0020_vollst_x00e4_ndig').title()._el().removeClass('highlight');
}
}
fd.field('Eingang_x0020_vollst_x00e4_ndig').change(function()
{
entrycompletehandler();
});
entrycompletehandler();
-
- Information
-
Who is online
Users browsing this forum: No registered users and 14 guests