My question is certainly very basic for those of you who know a little of javascript.
I want respondents to provide a number (heating costs last year) but to have the option to say "I don't know". For this I use a select question with two options, one being "I don't know" and one "Km (Specify)".
My problem is, I want them to give numbers (e.g. 1000 rather than "a thousand" or "1'234.45"). Hence I am trying to implement the following javascript custom verification, but with no luck so far;
[% Begin Unverified Perl
if(SSI_GetValue("heatingcost") ISNUMBER) {
var strErrorMessage = "";
}
else {var strErrorMessage = "bug";}
End Unverified %]
I have very limited skills with javascript, hence I am certainly missing the elephant in the middle of the room. Any help would be welcome!
PS: actually I am not using directly a numeric question because I would really like respondents to be able to select an "I don't know" option.