Issue on Field Style

amlanpal
Kilo Sage

Hi All,

I'm facing a typical issue on Field Style. Hope you can provide solution to this. Here is the issue:

I have applied same field style to both Caller field and Assigned to field on Incident form to display the VIP icon beside the field if the selected user is VIP. The Field Style applied on Caller field is an OOB one. Just created the same Field style for Assigned to field and modified the Field name & Value to Assigned to in order to apply the same style on the field.

Surprisingly, the Assigned to Field Style is not working on form view. Whereas, I can see the style applied to both the fields on List view. Please see the screenshots below.

The Field style for Assigned to field is given below. The only relevant changes are there for Caller field Field style is there and working fine:

Table: Incident

Field name: Assigned to

Value: javascript:current.assigned_to.vip == true;

Style:background-image: url('images/icons/vip.gif');

background-repeat: no-repeat;

background-position: 98% 5px;

padding-right: 30px;

Any help will be highly appreciated!

find_real_file.png

find_real_file.png

1 ACCEPTED SOLUTION

Kalaiarasan Pus
Giga Sage

Field style doesn't work usually on form layout if the value of field style contains 'javascript:' (Dynamic condition). If you can hard code some condition, it might work well.


View solution in original post

12 REPLIES 12

Nana5
Mega Guru

Hi Amlan,



    I think u should try with java script, it will work.


      document.body.style.backgroundImage = "url('images/icons/vip.gif')";




Thanks


Hi Prakash,



Thanks for your reply.



Can you please elaborate what exactly you meant by javascript? Do you suggest me to write a new Client script or to modify the Field Style? If it is Client Script then I'm not in favor of that, as for this we have to write it every places where the similar problem occurs. But if it is the Field style, then request you to guide me to achieve so.


Hi Amlan


Please use below css in style configure of the field



background-image: url("10off.png");


background-repeat: no-repeat;


background-position: 98% 5px;


padding-right: 30px;



Thanks


Hi Prakash,



Tried with your input. But the issue still exists. The style is applying only on List view, not on Form view.


Can you please suggest any alternative solution for this?