I am trying to inject HTML into a Custom List schema. Essentially I am injecting a button that would go next to every document in a document library.

Is this possible to do without having to build a completely seperate page and control to surface the data? I'm thinking perhaps something in the custom list template schema or some type of JS injection. I'm using SP 2010.

4 Answers 4


You might want to look into custom fields.

MSDN: Creating Custom SharePoint 2010 Field Types

Avinash blog/guide on how to create your own custom field

It may not be the right way, but it will push you more towards using SharePoints API to its full potential.

  • thanks, I thought about this, but have same feelings about right way that you do Sep 19, 2012 at 14:20
  • this solved it. I had to use CAML to format the main view, but could add a custom control for the popup Oct 25, 2012 at 1:22

Not sure if this will help, but have you thought about Calculated Columns? I have come across this blog and there are lots of examples how to insert HTML/CSS into list using a Calculated Column (I am using this technique for displaying images in list columns).

I think JS should work too but I've never tried, give this a shot maybe it will help. http://blog.pathtosharepoint.com/2008/09/01/using-calculated-columns-to-write-html/#comment-9825


What about a custom action in the Edit Control Block for each item, you can point this at a URL and pass the ID of the list item on the query string.


As @Tudor mentions; it's possible to use a calculated column to output HTML to the page. An alternative to Christophe's solution would be to use Pentalogic's (the company I work for) free HTML Calculated Column.

You have to sign up for our newsletter, so you'll be forced to read a variety of interesting SharePoint articles (some of which are related to our products) or you could just unsubscribe.

To be fair, even I subscribe to it. Mostly because it usually contains an article or two that I wrote.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.