SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to restrict, creation of duplicate list item in the Sharepoint 2007, using Javascript in content editor webpart to validate when an list item is added?

share|improve this question
Are you trying to have a unique column in the list item. How does this CEWP come into picture. Can you ellaborate the scenario? – Thomson Sep 9 '10 at 6:50
I have a list, whenever an item is added to this list, the title should be unique; there shouldn't be list items with same title.. – Anonymous Sep 9 '10 at 7:04
i understood the above , What are you trying to achieve using CEWP? – Thomson Sep 9 '10 at 8:00
Custom code is the only way to guarantee this. JavaScript can be disabled or altered. – Alex Angas Sep 24 '10 at 1:59

You can use the list web service via JavaScript/jQuery and validate if an item exists. I would prefer doing this on an event recevier (lot easier) but I guess you don't have a access to deploy code ? here are some samples using JS and here using jQuery

share|improve this answer

It wouldn't be trivial, but you can use javascript to carry out a web service call to lookup all items with the same title.

Have a look at the SPServices JavaScript library on CodePlex.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.