bugfix 20

This commit is contained in:
Jacob Levine 2019-03-22 00:24:23 -05:00
parent 7e23641591
commit cc958e0927

View File

@ -218,6 +218,10 @@ function processAndAppendReturn(data) {
if (index > -1) { if (index > -1) {
labels.splice(index, 1); labels.splice(index, 1);
} }
var index = labels.indexOf('order');
if (index > -1) {
labels.splice(index, 1);
}
var questions = []; var questions = [];
for (var j = 0; j < labels.length; j++) { for (var j = 0; j < labels.length; j++) {
questions.push([labels[j], data[labels[j]]]); questions.push([labels[j], data[labels[j]]]);
@ -230,7 +234,7 @@ function processAndAppendReturn(data) {
document.getElementById('FormData').innerHTML += questions[j][0]; document.getElementById('FormData').innerHTML += questions[j][0];
if (questions[j][1]['type'] == 'shortText') { if (questions[j][1]['type'] == 'shortText') {
document.getElementById('FormData').innerHTML += "<input id=''" + questions[j][0] + "' type='text'></input>"; document.getElementById('FormData').innerHTML += "<input id=''" + questions[j][0] + "' type='text'></input>";
} else if (questions[j][1]['type'] == 'longText') { } else if (questions[j][1]['type'] == 'textField') {
document.getElementById('FormData').innerHTML += "<textarea id=''" + questions[j][0] + "' rows='4' cols='50''></textarea>"; document.getElementById('FormData').innerHTML += "<textarea id=''" + questions[j][0] + "' rows='4' cols='50''></textarea>";
} else if (questions[j][1]['type'] == 'stepper') { } else if (questions[j][1]['type'] == 'stepper') {
document.getElementById('FormData').innerHTML += "<span id='" + questions[j][0] + "'><input type='button' onclick=\"dec('" + questions[j][0] + "')\" value='-'></input>" + (questions[j][1]['defaultValue']).toString() + "<input type='button' onclick=\"inc('" + questions[j][0] + "')\" value='+'></input></span>"; document.getElementById('FormData').innerHTML += "<span id='" + questions[j][0] + "'><input type='button' onclick=\"dec('" + questions[j][0] + "')\" value='-'></input>" + (questions[j][1]['defaultValue']).toString() + "<input type='button' onclick=\"inc('" + questions[j][0] + "')\" value='+'></input></span>";