Affichage des articles dont le libellé est execute script on load. Afficher tous les articles
Affichage des articles dont le libellé est execute script on load. Afficher tous les articles

vendredi 7 novembre 2008

Fill a user/group field with the current user username on page load

hi everyone, today i'll post how to fill a user/group field with the current user username on page load.the solution was built on javascript script, so you've to be a little bit familiar with it, cuz anyway it will bring you a great help on developing web content.


here's the fucntion :


personnaly i put it in the first template call


at the end you must call _spBodyOnLoadFunctionNames.push() function brought by SharePoint to execute you needed function on page load :

_spBodyOnLoadFunctionNames.push("get_CurrentUser");



Now after you did all that, save the file and execute.
i hope i helped you even if a little bit, if there's a question about that or anything else, mail me or comment on the post, i'll be here.