cancel
Showing results for 
Search instead for 
Did you mean: 
aishuiyer
Nintex Newbie

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
6 Replies
emha
Nintex Newbie

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.

Reply
aishuiyer
Nintex Newbie

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.

Reply
EuanGamble
Nintex Newbie

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

Reply
cbennett1
Nintex Newbie

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

Ever have to change the color of the highlighted field on a form for color blind end-users? I'm looking for help there... I've changed the color or error messages easily, but haven't found the right code for changing the border color on highlight whenever a validation rule is triggered. Help! thanks! Smiley Happy
0 Kudos
Reply
FabioLiberatore
Nintex Newbie

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

Hi @cbennett1 this is Fab and I work as a User Experience designer for Nintex Forms and Mobile. I am currently working on a new experience for form styling that we will introduce across Universal Forms. Can I ask as to what version of Nintex forms you are currently designing in? 

Hope to hear from you soon and Kind Regards. 

Fab. 

0 Kudos
Reply
cbennett1
Nintex Newbie

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

Hi FabioLiberatore... About to upgrade to the latest greatest, but current on Version: 4.3.1.0...
0 Kudos
Reply