This project has moved and is read-only. For the latest updates, please go here.

How to get current site name and set it as SharePoint list field value?

Aug 16, 2012 at 10:57 AM

  Is it possible to do this with jQuery and SPServices? If so, any links or examples will be appreciated. Thanks in advance.

Aug 16, 2012 at 1:30 PM

I was able to found a simple answer for my question:

 $(document).ready(function() {
 var thisSite = $().SPServices.SPGetCurrentSite();
 alert (thisSite);
 $('input[title="Site name"]').val(thisSite);


Where thisSite - variable which store current site value, Site name - display name of single line or text form SharePoint field