Category: code

JavaScript to hide SharePoint title column fields in list view

Sometimes you want to show a list on your homepage. You can do that by adding the webpart to the page. But what is also does is show the headers: the column titles. For example, if you add the announcements with some own field, you don’t need those headers. You could create a walkaround by …


how to get user details from your current user in SharePoint via jquery and webservices

This time we are going to look at SPServices, a great codeplex project, so freely available. The SPServices can be described as a jQuery library which abstracts SharePoint’s Web Services and makes them easier to use. To demonstrate that, let us look at the SPCurrentUser function. This SPGetCurrentUser function does an AJAX call to grab …


Build a url in xsl for a dynamic link in SharePoint results page

If you create a custom results page for your SharePoint, you may want to create a custom url. For example, if you have a specific page that displays information and you want the users to go there via the search. Or, if you want to link to the dispform for a folder instead of the …


Hide dropdown values from choice fields in SharePoint via jQuery

hide some values in a dropdown field. This is not a way to create a cascaded dropdown, but it could be helpful if you want the users to be able to not select something when a specific rule is met.


Automatically fill in fields via JQuery in SharePoint

Last time we talked about hiding fields in the editform, newform and dispform. But what if we don’t want to hide a certain field, but rather get some value and put it in? An example could be to fill in a unique number or the day of the week. Code First, add the reference to …


Hide the Content Type field in the editform via jQuery

Hi again, Another blogpost here about jQuery. After my blogpost about hiding fields in the Editform, I got a lot of questions on how to hide the Content Type field. For instance, when you create a folder content type, you will always have the choice to select the default content type “folder”. So let us …


Ways to get sharepoint 2010 fields in jQuery: Editform vs Dispform

Hi again, All about jQuery these days.This is such a powerful language to do a lot of cool things on SharePoint! After my blogpost about hiding fields in the Editform in SharePoint, I got some questions on how to hide fields in the Dispform too. So let us check out what happens in SharePoint and …


SharePoint (2007 + 2010) Jquery presave action to validate items before you save it

What are you talking about? A new feature in SharePoint 2010 is the validation option. I already blogged about it but I soon came to some limits. You have 2 kinds of validation settings: – on a column with the restriction that you cannot refer to other fields; great for when you want to check …


Hide fields on new and edit pages in SharePoint (2007 and 2010) via jQuery

What are you talking about? When you are automating a certain process or site in SharePoint, sometimes you want to hide some fields. Let me give you an example: I have a list to keep track of a process, say an RFP. I can enter a new RFP, but when I create a new one, …


Write Html code in SharePoint 2010

What are you talking about? Last year I wrote a blogpost concerning the PathToSharePoint solution to parse html on a SharePoint page. That solution was great and was working really well. It wasn’t however working in SharePoint 2010. They have released a new script, specifically for SharePoint 2010! What is it ? Say, you want …