started commenting parseForm
This commit is contained in:
parent
e6d4e42484
commit
d370539def
@ -61,6 +61,7 @@ function parseFormOnSubmit(returnJSON = false, parseOnly = false) {
|
||||
//get the complete unparsed template string from sessionstorage from loadTemplate
|
||||
let fullString = window.sessionStorage.getItem("fullString");
|
||||
|
||||
//define output buffer
|
||||
let b = "";
|
||||
|
||||
if (objects == null) {
|
||||
@ -70,13 +71,20 @@ function parseFormOnSubmit(returnJSON = false, parseOnly = false) {
|
||||
|
||||
//iterate through templateObjects and look for according formdata
|
||||
for (let obj of objects) {
|
||||
//compaire each obj with elements from mainFormObj
|
||||
for (let data of dataArray) {
|
||||
|
||||
//convert conList Master name to default name as set flag for appending connected list fields cl-name
|
||||
let conListFlag = false;
|
||||
//if obj is the connected list main selector
|
||||
if (data.name.split("-")[0] == "clM") {
|
||||
//if connected list main matches current object
|
||||
if (data.name.substring(4) === obj.word.replace(/ /g, "_") ) {
|
||||
//set flag for next iteration of loop
|
||||
conListFlag = true;
|
||||
data.name = data.name.substring(4);
|
||||
|
||||
//selection is not added to buffer
|
||||
if (data.value == "!none") {
|
||||
obj.result = "";
|
||||
continue;
|
||||
@ -87,6 +95,8 @@ function parseFormOnSubmit(returnJSON = false, parseOnly = false) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//if field matches current object
|
||||
if (obj.word.replace(/ /g, "_") === data.name) {
|
||||
let value = parseDataForResult(obj, data.value);
|
||||
obj.result = value;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user