views:

476

answers:

3

I have a task that I need to perform for a friend as a favor, to modify some forms on a MOSS/Sharepoint site to add some javascript to each form for some SEO tracking purposes.

I've had a little bit of exposure to Sharepoint, but it is mostly by using the Sharepoint Designer 2007 tool.

I am able to navigate to the site, and I can see the content in Sharepoint Designer. However, I am not able to see the forms, and I'm a bit stuck.

Here is an example of a form that I need to modify: http://www.MY_SITE_GOES_HERE.com/forms/covg_order.aspx

I've read a little online, but I'm stuck. I don't know if these are infopath forms or what. I just need to modify the forms.

Is there a simple answer to this problem? Or a good resource to get up to speed quickly for this task?

I'm not a sharepoint expert, so thank you in advance for answering a simple question.

A: 

You have a couple of options here:

  1. If you need to add a unique code, like Google analytics you should probably deploy your code to the master page.

  2. In case you need to customize forms for lists you will have to do it with SharePoint designer. In that case you will find EditItem.aspx and NewItem.aspx with SharePoint Designer pages or any other custom page. Open SPD, locate your list, expand it, look for Forms subfolder and you will find all the forms there.

Toni Frankola
+1  A: 

While hardly the simplest approach, but since this is a developer site, I would recommend creating a DelegateControl to add to your site. Using DelegateControls has several benefits, for example:

  • the ability to selectively activate and deactivate the controls through features
  • no need to modify any out-of-the-box files which would break supportability
  • ability to output different content on a page-by-page basis

You can opt to use one of the DelegateControls of the default master pages if you need to deploy to an existing site based on one of the default site definitions. The AdditionalPageHead is a favorite among developers, as it allows multiple overrides to be active at the same time.

If you want to create your own master pages you can add DelegateControls as you like.

If you want to learn more about DelegateControls you can check out the first issue of Understanding SharePoint Journal (Disclaimer: I wrote that issue). Also, check out the MSDN article on How to customize a Delegate Control.

.b

Bjørn Furuknap
A: 

Microsoft Office SharePoint Designer is now free, as of 1-Apr-2009. It's a good tool, not only for modifying individual pages, but for entire sites.

John Saunders