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

reload page after submit

parent aeef9d9d
No related branches found
No related tags found
3 merge requests!58Version 1.1,!54Issue #53: Fix password info,!15Issue/4
......@@ -118,18 +118,18 @@ function App() {
"placement": index-1,
"description": "Adicionar esse campo no front",
"question": x.question,
"enabled": x.required,
"enabled": true,
"type": 0, // question type = 0
"validation": []
"validation": x.required ? [{"type": 2, "arguments": ""}] : []
});
} else if(x.type === "select") {
json.inputs.push({
"placement": index-1,
"description": "Adicionar esse campo no front",
"question": x.question,
"enabled": x.required,
"enabled": true,
"type": 3, // select type = 3
"validation": [],
"validation": x.required ? [{"type": 2, "arguments": ""}] : [],
"sugestions": x.options.map(function(y, index) { return {value: y, placement: index} })
});
} else if(x.type === "checkbox") {
......@@ -137,9 +137,9 @@ function App() {
"placement": index-1,
"description": "Adicionar esse campo no front",
"question": x.question,
"enabled": x.required,
"enabled": true,
"type": 1, // checkbox type = 1
"validation": [],
"validation": x.required ? [{"type": 2, "arguments": ""}] : [],
"sugestions": x.options.map(function(y, index) { return {value: y, placement: index} })
});
} else if(x.type === "radio") {
......@@ -147,9 +147,9 @@ function App() {
"placement": index-1,
"description": "Adicionar esse campo no front",
"question": x.question,
"enabled": x.required,
"enabled": true,
"type": 2, // radio type = 2
"validation": [],
"validation": x.required ? [{"type": 2, "arguments": ""}] : [],
"sugestions": x.options.map(function(y, index) { return {value: y, placement: index} })
});
}
......@@ -161,7 +161,10 @@ function App() {
.then(res => {
console.log(res);
console.log(res.data);
window.location.reload();
});
}
return (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment