Reports create page get dynamic field and save.

This commit is contained in:
Cüneyt Şentürk
2020-01-18 19:24:29 +03:00
parent 336e581ab7
commit 7efc4cf7b9
22 changed files with 192 additions and 128 deletions

View File

@ -42,6 +42,20 @@ export default class Form {
continue;
}
if (form_element.getAttribute('data-field')) {
if (!this[form_element.getAttribute('data-field')]) {
var field = {};
this[form_element.getAttribute('data-field')] = field;
}
if (!this[form_element.getAttribute('data-field')][name]) {
this[form_element.getAttribute('data-field')][name] = '';
}
continue;
}
if (type == 'radio') {
if (!this[name]) {
this[name] = (form_element.getAttribute('value') ? 1 : 0) || 0;