Skip to content
Snippets Groups Projects
Commit aeef9d9d authored by pdg16's avatar pdg16
Browse files

add fields select, radio and checkbox

parent e2a47f5d
No related branches found
No related tags found
3 merge requests!58Version 1.1,!54Issue #53: Fix password info,!15Issue/4
......@@ -122,6 +122,36 @@ function App() {
"type": 0, // question type = 0
"validation": []
});
} else if(x.type === "select") {
json.inputs.push({
"placement": index-1,
"description": "Adicionar esse campo no front",
"question": x.question,
"enabled": x.required,
"type": 3, // select type = 3
"validation": [],
"sugestions": x.options.map(function(y, index) { return {value: y, placement: index} })
});
} else if(x.type === "checkbox") {
json.inputs.push({
"placement": index-1,
"description": "Adicionar esse campo no front",
"question": x.question,
"enabled": x.required,
"type": 1, // checkbox type = 1
"validation": [],
"sugestions": x.options.map(function(y, index) { return {value: y, placement: index} })
});
} else if(x.type === "radio") {
json.inputs.push({
"placement": index-1,
"description": "Adicionar esse campo no front",
"question": x.question,
"enabled": x.required,
"type": 2, // radio type = 2
"validation": [],
"sugestions": x.options.map(function(y, index) { return {value: y, placement: index} })
});
}
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment