cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

how do i change the border of list lookup to red to show incorrect input?

if(fromShortcode.val() == toShortcode.val()){
 alert('same values entered in both the field!');
 NWF$(shortCode).addClass('border-red');
 }
 else
     {
      NWF$(shortCode).removeClass("red-border");
     }
  });
});

this is te code I have written where if the 'if' condition gets true then the list lookup field(shortCode) is to be set to red border or it should remain black itself

0 Kudos
Reply
3 Replies
Workflow Hero

Re: how do i change the border of list lookup to red to show incorrect input?

use validation rules to check whether inputs meet your requirements.

if validation doesn't pass through respective controls will be automatically highlighted.

Accept as Solution Reply
Workflow Hero

Re: how do i change the border of list lookup to red to show incorrect input?

Yes thank you for the reply, the validation rules work when the form gets submitted.

while solving it I tried doing that in real time (i.e before submitting the form) using JavaScript and CSS and it worked for me.

I'm sharing the code as it can be helpful to someone.

NWF$(".border").css({"border-color": "#FF0000",
             "border-width":"3px",
             "border-style":"solid"});

the above code goes in the custom JavaScript field

And in the 'control CSS class' of the field u want to highlight(which you will get in the formatting field in settings)u have to name it border.

Accept as Solution Reply
Workflow Hero

Re: how do i change the border of list lookup to red to show incorrect input?

Hi all,

 

Our UX team are doing some research into our style builder for Universal Forms. We would appreciate your feedback on your current experience in styling your forms in any platform.

 

If you would like to provide feedback, please fill out the survey at Applying styles in Nintex Forms 

 

Thanks,

Euan

0 Kudos
Accept as Solution Reply