- <script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/2014.02/jquery.SPServices-2014.02.min.js" type="text/javascript"></script>
- <script type="text/javascript">
- $(document).ready(function() {
-
- var UserName= $().SPServices.SPGetCurrentUser({
- fieldName: "Title",
- debug: false
- });
-
- $('textarea[title="Requestor"]').val(UserName);
- $('input[title="Requestor"]').val(UserName);
- });
- </script>
In following Image you can see current user name will be auto populated on page load.