- <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() {
- // get the title of current user
- var UserName= $().SPServices.SPGetCurrentUser({
- fieldName: "Title",
- debug: false
- });
- //populate the field ‘Requestor’ with the current account
- $('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.


Anish GuptaPosted Apr 1, 2019, 10:32 PM
It is working fine. Only problem i am facing is that the by default placeholder (i.e., Enter a name or Email address) for the input type [text] is showing along with the current user name. Also it should be disabled
Gowtham RajamanickamPosted Apr 10, 2016, 8:15 AM
Try to add some output window
Gowtham RajamanickamPosted Apr 2, 2015, 7:10 AM
simply sooperb