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

I would like to use standard SharePoint form for list (NewForm.aspx), but want to auto submit it after specified time - 60 minutes to list. All fields will be optional. This will be used for quiz for users.

Is there a way how to simply insert a piece of script into NewForm.aspx source to do this? Or with use of customized form instead?

share|improve this question
up vote 0 down vote accepted

I'm not sure why you would want to do this but... you could probably accomplish this with a little JavaScript on the page.

My JavaScript library of choice is Prototype.js so you can find the OK buttons with a selector like:


Then, it is just a matter of "clicking" them after an hour (60 minutes * 60 seconds * 1000 = 3,600,000 ms):

function SubmitFormAfterAnHour() {
setTimeout("SubmitFormAfterAnHour()", 3600000);

(I am typing this in Notepad so please test)

share|improve this answer
Thank you Kit, this works for me. Reason why is, that my team wants to provide any quiz attendees only specific timeframe for quiz. Thanks again, m. – user483 Feb 23 '11 at 17:06
this would be ideal for a quiz I have as well, can you tell me where I would put the script? Kris – Kris Nov 28 '12 at 16:08
@Kris There are a couple different ways which I've documented here:… – Kit Menke Nov 28 '12 at 19:59

Your Answer


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