# HG changeset patch # User Nicholas Jillings # Date 1434641980 -3600 # Node ID a1574e8dfca69e7a24f42e0a1704c496ebb5410e # Parent ccbeb4fb731575f49528488a7e69793b9034df14 Number option for survey checked to be a number. Throws an error if NaN, before would not store the response. diff -r ccbeb4fb7315 -r a1574e8dfca6 core.js --- a/core.js Thu Jun 18 16:26:45 2015 +0100 +++ b/core.js Thu Jun 18 16:39:40 2015 +0100 @@ -204,7 +204,7 @@ this.popupContent.appendChild(span); this.popupContent.appendChild(document.createElement('br')); var input = document.createElement('input'); - input.type = 'number'; + input.type = 'textarea'; if (node.min != null) {input.min = node.min;} if (node.max != null) {input.max = node.max;} if (node.step != null) {input.step = node.step;} @@ -298,7 +298,7 @@ return; } var enteredNumber = Number(input.value); - if (enteredNumber == undefined) { + if (isNaN(enteredNumber)) { alert('Please enter a valid number'); return; }