Compare People Picker Field Names
Posted: 06 May 2020
Hi,
I have a form with two people picker fields in which the two fields cannot have the same person chosen. How do I compare the values in the two fields, and if they are the same alert the user on submit.
See my code below, but I keep getting an error:
fd.onsubmit(function () {
if (fd.field('Owner').value() == fd.field('Checker').value()){
alert('Owner cannot be the same as Checker'');
return false;
}
return true;
});
I have a form with two people picker fields in which the two fields cannot have the same person chosen. How do I compare the values in the two fields, and if they are the same alert the user on submit.
See my code below, but I keep getting an error:
fd.onsubmit(function () {
if (fd.field('Owner').value() == fd.field('Checker').value()){
alert('Owner cannot be the same as Checker'');
return false;
}
return true;
});