Answered Auto-populate the current user's name on a people picker

  • Thursday, May 24, 2012 4:04 AM
     
     

    Hello,

    Is there a way to auto-populate the current user's name on a people picker by designing the list form through SPD? i know i can do it in InfoPath Designer, but i found no way to do that in SPD..

    I saw someone suggested the below javascript. I used a CEWP and inserted the code, but the current user name still didn't showed up on the people picker field. I changed the fieldName to the field name of the people picker, but still didn't worked.

    <script type="text/javascript">
    $(document).ready(function() {
    $('div.ms-inputuserfield').text($().SPServices.SPGetCurrentUser({fieldName: "Title",debug: false}));});
    </script>

All Replies