Skip to main content

I have a date picker, single line text, drop down menu, people picker fields on my form.

When I click on a button it calls a method to highlight the border.

However it only works on the single line text and date picker fields.  

It is not working on the drop down and people picker fields. 

Ex: Department Name, Number, Submitted on Behalf Of

205820_pastedImage_1.png

Code

205821_pastedImage_2.png

Can anyone else replicate this issue?  

Hi,

NWF$(document).ready(function()
{  
 NWF$('#'+text).css("cssText", "border-color: red");
NWF$('#'+date).css("cssText", "border-color: red");
NWF$('#'+dropdown).css("cssText", "border-color: red !important;");
NWF$('#'+people).closest('.nf-filler-control-border')r0].style.border='1px solid red'
});

Thanks,

Lakshmi


@Lakshmi C Thank you.  Your tip was very helpful.  However when applied the code to the drop down menu, it applied the CSS to a hidden text box below the drop down menu instead of the drop down menu itself.  Do you know why I am not getting the same results as you?


I did some research and used the parentsUntil() method to apply the CSS to all ancestor elements on the drop down menu.  Afterwards, the CSS was applied to only the drop down menu and the text box was removed.


Reply