View Full Version : Email form with timer?
wwstriviafed
07-22-2008, 11:41 PM
Hello,
I am looking for a script which will allow me to create an email form with a "start" button, that will TIME how long it takes the user to complete the form.
It would be a 10-question form, and I would need the answers emailed to me along with the start time, and end time.
I already use mycontactform.com for my email forms, but they do not offer a timer feature. I have scoured the web looking for various testing tools that allow for a timed test type of a form, but they are all WAY overpriced because they are for educators. (Some as high as $1500.00, plus $25/year PER user)
Any advice on this would be extremely helpful, as this seems like a fairly simple script.. yet it doesn't seem to exist.
Thank you!
Mark Reeves
wwstriviafed@gmail.com
Do you want a little side thing that has the time, or the time should be hidden until they hit done?
wwstriviafed
07-22-2008, 11:55 PM
Having the time visible would be better... but it's not mandatory.
Ok, because I may be able to do it visible. Just, don't count on it, though I'll try me best.
wwstriviafed
07-22-2008, 11:59 PM
That would be great. I know nothing about writing scripts, but I'm shocked nothing like this exists.
Web Design Company
07-23-2008, 07:42 AM
the concept is nice but I too haven't heard any script like that :(
Medyman
07-24-2008, 12:01 AM
the concept is nice but I too haven't heard any script like that :(
Because there really isn't a need for it. I don't see the utility in timing your everyday forms. Now, there are specialty uses which this case might be. For those specialty cases, it's not too hard to create your own script.
Now, I'm not the best with pure JavaScript. But, considering the similarities between JS and ActionScript, I can't imagine that it would be too hard to code such a thing. It'll just be a few for loops, set on a timer. Nothing very complicated.
But, for those of us know aren't JavaScript gurus, there is jQuery. I'm a huge huge huge fan of jQuery. It's made my life a lot easier as a web developer. And this can be easily done in jQuery. Not to take away Nile's thunder, but here (http://www.visualbinary.net/files/tutorials/jquery-timer/form/) is a little example I just made up that illustrates this functionality.
Hit the "Begin" button to start the timer and "Submit" to stop it. There is a little notification under the last input field that says how long the entire form has taken to complete. Also, the second text field also contains the time in seconds. Presumably, you wouldn't want to be saving strings such as "1 minute 30 seconds" into your database (or however you're using the time data). A simple number is probably more flexible to deal with.
Of course, in application, you would make the 2nd field hidden. I just left it visible for illustration purposes.
Feel free to crack open the source and take a look around. All questions are welcome.
Ok, MedyMan saved me. :) Thanks, lol.
wwstriviafed
07-24-2008, 04:03 PM
Thanks Medyman, I really appreciate your work on this! I have a few questions.
I'm an idiot when it comes to scripts, so I apologize if any of this sounds completely ignorant.
When I view the source, and attempt to replicate this form on my own.. a few things happen.
1. The style is lost. I end up with no style whatsoever, and I was wondering where that exists in the code, because I cannot replicate it.
2. The begin/submit buttons no longer work. This might be because the .js script URL is truncated, and I don't know the actual address.
3. Another question that pops up.. is... how can I guarantee I don't lose functionality of this form... if the script is no longer hosted? Is it possible for me to download the script?
4. The time appears in the 2nd field on your form. I'm not sure if this is just a hiccup.
Also..
- Is there a way to control the width of the answer fields?
- When I use your form the seconds count by 2. Is there a way to time the form ONLY in seconds (not minutes), and have it count by 1?
- Lastly... the goal here is to have the results (answers/time) emailed to a defined email address. Is this possible? Because that is the main function I cannot find in any of the commercial services I've checked out.
Thanks again! You could potentially be a lifesaver!
Medyman
07-24-2008, 04:19 PM
1. The style is lost. I end up with no style whatsoever, and I was wondering where that exists in the code, because I cannot replicate it.
I'm linking to an external CSS file. The CSS really has no role in the functioning of this. A simple form would do the trick. For reference, the external CSS file is located here (http://www.visualbinary.net/files/tutorials/jquery-timer/form/style.css).
2. The begin/submit buttons no longer work.
You probably haven't downloaded the javascript files either. Download the latest version of jQuery (http://jquery.com/) from here (http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.2.6.min.js). Also, download the jQuery Timers plugin (http://jquery.offput.ca/every/). You'll need to link both in your <head> section. See my example (http://www.visualbinary.net/files/tutorials/jquery-timer/form/) if you're not sure how.
Is there a way to control the width of the answer fields?
Again, this is a CSS question. You can specify any style that you want. The JavaScript is style agnostic...meaning, that you can make it look like whatever you want and it'll still work.
When I use your form the seconds count by 2. Is there a way to time the form ONLY in seconds (not minutes), and have it count by 1?
It does increment by one. Also, reread my first post. Like I said, the form is calculating only seconds. The display, however, in minutes and seconds to make it more readable.
Lastly... the goal here is to have the results (answers/time) emailed to a defined email address. Is this possible? Because that is the main function I cannot find in any of the commercial services I've checked out.
Of course. I assumed you already had a functioning form and wanted to add this to it. You would need some server side script. Search these forums and/or Google, for a PHP email script. You could even use this generator (http://www.tele-pro.co.uk/scripts/contact_form/).
It's fairly commonplace functionality, you should have no trouble finding it on Google. Otherwise, give Nile a buzz. I'm sure he'll be up to create a quick PHP email script for you!
wwstriviafed
07-24-2008, 05:03 PM
Thanks again.
karim
06-09-2009, 03:22 PM
This review might be helpful:
http://garcya.us/blog/what-makes-the-best-web-forms-be-really-best/
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.