1 minute read
As I always say to Laura, it’s amazing how many different ways there are to do something in SharePoint! I would probably do it differently, but that’s not to say that Laura’s approach isn’t a perfectly good one.
In this case, I would use SPServices and the $().SPServices.SPGetCurrentUser function to populate the values with script. The upside of this approach is that you wouldn’t need to customize the form if you didn’t need to for some other reason. You could just add the script to the page, either in the page itself (my recommendation) or in a Content Editor Web Part (CEWP).
One other note on Laura’s approach. If you are populating the list columns with the current user’s Department or Phone, it *might* be a bad idea. If you are really duplicating those values, you run the risk of them changing in the User Information List (via an update from Active Directory, most likely) and having the values in your list be wrong. If, on the other hand, you are using them for some point in time thing (like “What’s your current Department?” in a survey), then you’re fine.
Here’s the jQuery script which would do it: