Hi Guys,
I have 2 fields in my NewForm that I would like to be auto-populated.
Initiator field – it should load the current SharePoint user.
Manager of Initiator field – It should contain the Manager of the current SharePoint user.
I was able to auto-populate the Initiator field by this below code (from this post) but I don’t know how to do this for the Manager of Initiator field. Can you guys help me how to achieve this?
<script src="../../Scripts/jquery-1.6.2.js" type="text/javascript"></script><script type="text/javascript" src="/RSQE/SCAR/Scripts/jquery.SPServices-0.7.2.min.js"></script><script type="text/javascript" language="javascript"> $(document).ready(function() { var userName = $().SPServices.SPGetCurrentUser({ fieldName: "Title" }); $("input[Title='Initiator']").val(userName); });</script>
Thank You,
Arnel