MERLIN ROCKET FORUM

Topic : New Survey

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

Posted: 02/02/2010 22:56:15
By: alanf
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


Posted: 03/02/2010 10:09:45
By: barnsie
Thanks, I thoughtI had teh validation up to 365 days. I'll try and fix that


Posted: 03/02/2010 13:17:01
By: 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.


Posted: 03/02/2010 22:45:58
By: alanf
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 ;)


Posted: 05/02/2010 02:30:54
By: Robin Szemeti
nah, i'd have used javascript to validate it client-side


Posted: 05/02/2010 10:38:09
By: Mags
I would not worry about it, I would get my son to do it. Or any younger person still at school.


Posted: 05/02/2010 11:03:28
By: Old codger
Personally I would have left it without any validation at all and see how many put in more than 366 (allowing for leap years!)


Posted: 05/02/2010 14:01:47
By: Nerdless
^([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.


Posted: 05/02/2010 18:23:45
By: alanf

REPLY

To Reply, please join/renew membership.

Owners Association


Developed & Supported by YorkSoft Ltd

Contact

Merlin Rocket Owners Association
Secretary