New Survey

02/02/2010 22:56:15
alanf
Well, nearly a year has passed since my last survey on sailing fitness, and the dark cold winter has had me playing with some new survey software. This time, I thought I would ask about equipment failures. I'm sure that there will be many spelling mistakes and maybe the odd uncomprehensible question, so early feedback on improvement would help (e-mail link on the side there).

Enjoy the survey. I'll publish my summary once I get enough data.

http://www.sailfun.co.uk/survey/index.php?sid=55111&lang=en
03/02/2010 10:09:45
barnsie
Hi Alan

Filled in the form. However, if one is to add more than 99 days to the form, it will not let you proceed. So added 95. Can you update to 105 please.

Mark

03/02/2010 13:17:01
alanf
Thanks, I thoughtI had teh validation up to 365 days. I'll try and fix that

03/02/2010 22:45:58
alanf
Fixed. If any techy geeks want to know what regular expresion validates 0-365 correctly drop me a line, as I have a solution.

05/02/2010 02:30:54
Robin Szemeti
0 to 365, ??? scratches head ... theres proably a more elegant way, but ...

^([0-9][0-9]?|[12][0-9][0-9]|3[0-5][0-9]|36[0-5])$

personally, I would have done it server side,

my($days) = param('days') =~ /^(d{1,3})$/;

and then checked day was between 0 and 365 ...

now then .. about leap-years ;)

05/02/2010 10:38:09
Mags
nah, i'd have used javascript to validate it client-side

05/02/2010 11:03:28
Old codger
I would not worry about it, I would get my son to do it. Or any younger person still at school.

05/02/2010 14:01:47
Nerdless
Personally I would have left it without any validation at all and see how many put in more than 366 (allowing for leap years!)

05/02/2010 18:23:45
alanf
^([0]{0,2}[1-9]|[0]?[1-9][0-9]|[12][0-9][0-9]|3[0-5][0-9]|36[0-5])$

I was tempted to leave it with no validation.

Doing it in any other way wasn't a real option for me, as I would have had to spend too much time hacking the survey software to do it client side. I guess I could have done something server side but hey ho.

REPLY

Your Name
YouTube Clip
Paste the link provided by youtube under the "Share" button, looks like this "http://www.youtube.com/embed/XEsrho3jqbo"
REPLY
Type a Number under 41: