Posts Tagged ‘jQuery’

How to edit List forms in SharePoint 2010

Date:July 29th, 2010 Author:Ryan Tags: , ,
Category: General, SharePoint Ideas Comments:1 ;

In SharePoint 2007 there is a well known trick for opening up a list’s forms (New/View/Edit) in design mode – append ?ToolpaneView=2 onto the url – this is often used to add instructions or javascript using a Content Editor Web Part (CEWP) e.g.

However when I first tried to use my tried and tested shortcut in SharePoint 2010 I came a little unstuck as now the New/View/Edit forms appear in a fake popup window and modifying the URL doesn’t work.

There are two ways to do this in SharePoint 2010 – and once you know where to find them they should actually make life that little bit easier.

The first is to open up the form in a new window and then add ToolpaneView=2 onto the end of the URL, so

Right click on Add new Item or the lists Title field and select Open in New Tab or hold down CTRL while left clicking.

Alternatively you can do this using the new-fangled ribbon toolbar – select under List Tools the List tab, then on the right hand side of the ribbon you should see an icon for Form Web Parts which gives a menu of the different forms associated with the list that you can edit.


Showing the records ID on the View and Edit forms

Date:July 23rd, 2010 Author:Ryan Tags: , ,
Category: SharePoint Ideas Comments:10 ;

SharePoint - Modify View and show ID column

ID’s are a convenient, often short, way to uniquely refer to something. Unless you’re the Tax man who seems to believe he can’t get through his day without giving me, thats just one person, 7 unique id’s – presumably one for each extremity that we would like a piece off…

I digress… ID’s – SharePoint uses an ID for each item in a list and sometimes its handy to know them “Ere Bob – have you done task 1234 yet?”

You can easily add them to the list view (Modify this View then find the ID column, click display)

SharePoint - view with ID column

But what about if you want to see this on the View and Edit forms? (You can’t see it on the New form as it doesn’t get an ID assigned until you’ve created it)

You can’t do this in the UI. You can create a custom View/Edit form using SharePoint designer but its quite complex, is a pain when we add new fields and its fraught with potential problems.

So instead we’re going to look into every ones favourite SharePoint UI hacking tools – the Content Editor Web Part (CEWP) and javascript/jQuery.

(more…)

Setting a default duration for new SharePoint Calender Events

Date:September 30th, 2009 Author:Ryan Tags: , , ,
Category: General, SharePoint Ideas Comments:10 ;

Tristan asked in another post

“When a calendar event is being created, I want the end date/time to automatically populate to 1.5 hours after the start date/time.  Seems simple, but haven’t found a formula for this yet”

new-event-thumb

Sounds like a pretty reasonable suggestion and the Calendar lists NewForm.asx already sets the Start time to the current time – shouldn’t be too hard, right?…

(more…)