Validation of the field "Person and Group"

0

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;
        }   
  }   
    
asked by anonymous 16.07.2018 / 20:28

1 answer

0

Hello, This type of field is annoying even to handle. Take a look here link

Abs

    
20.07.2018 / 23:35