Hello,
I'm using the default Sharepoint form, and I want to do a validation on a "person or group" field, basically the edit form can not save if this field is blank. I've tried it in some ways, but what I understood with this type of field is not so easy to work with. the code below is what I am currently using for other types of fields a Select and an Input in both are already working.
function PreSaveAction() {
var camp1 = $("select[title='camp1'] option:selected").val();
var camp2 = $("input[title='camp2']").val();
if(camp1 == "" || camp2 == "")
{
alert("Os Campos 'camp1', 'camp2' não podem ficar em branco.");
return false;
}
else{
return true;
}
}