0

JSONデータを含むフォームジェネレーターがあります

{ "10" : { "custom" : null,
      "custom2" : null,
      "label" : "Sublimacja",
      "max" : "",
      "min" : "",
      "required" : "0",
      "tooltip" : "field7",
      "type" : "dropdown",
      "validation" : "",
      "value" : "Sublimacja 205g"
    },
  "11" : { "custom" : null,
      "custom2" : null,
      "label" : "Druk+UV",
      "max" : "",
      "min" : "",
      "required" : "0",
      "tooltip" : "field8",
      "type" : "dropdown",
      "validation" : "",
      "value" : "Kalka"
    },
  "12" : { "custom" : null,
      "custom2" : null,
      "label" : "Rodzaj+wyko%C5%84czenia",
      "max" : "",
      "min" : "",
      "required" : "0",
      "tooltip" : "field9",
      "type" : "dropdown",
      "validation" : "",
      "value" : "Cięcie do wymiaru"
    },
  "13" : { "custom" : null,
      "custom2" : null,
      "label" : "Rodzaj+wysy%C5%82ki",
      "max" : "",
      "min" : "",
      "required" : "0",
      "tooltip" : "field10",
      "type" : "dropdown",
      "validation" : "",
      "value" : "UPS Standard"
    },
  "14" : { "custom" : null,
      "custom2" : null,
      "label" : "Adres+wysy%C5%82ki",
      "max" : "60",
      "min" : "0",
      "required" : "0",
      "tooltip" : "field11",
      "type" : "para",
      "validation" : "",
      "value" : ""
    },
  "15" : { "custom" : null,
      "custom2" : null,
      "label" : "Uwagi+dodatkowe",
      "max" : "60",
      "min" : "0",
      "required" : "0",
      "tooltip" : "field12",
      "type" : "para",
      "validation" : "",
      "value" : ""
    },
  "16" : { "custom" : null,
      "custom2" : null,
      "label" : "divider",
      "max" : null,
      "min" : null,
      "required" : null,
      "tooltip" : null,
      "type" : "divider",
      "validation" : "divider",
      "value" : "Plik 1"
    },
  "17" : { "custom" : null,
      "custom2" : null,
      "label" : "Nazwa+pliku+1",
      "max" : "60",
      "min" : "0",
      "required" : "0",
      "tooltip" : "field14",
      "type" : "text",
      "validation" : "",
      "value" : ""
    },
  "18" : { "custom" : null,
      "custom2" : null,
      "label" : "Ilo%C5%9B%C4%87",
      "max" : "60",
      "min" : "0",
      "required" : "0",
      "tooltip" : "field15",
      "type" : "text",
      "validation" : "",
      "value" : ""
    },
  "19" : { "custom" : null,
      "custom2" : null,
      "label" : "Wysoko%C5%9B%C4%87",
      "max" : "60",
      "min" : "0",
      "required" : "0",
      "tooltip" : "field16",
      "type" : "text",
      "validation" : "",
      "value" : ""
    },
  "2" : { "custom" : null,
      "custom2" : null,
      "label" : "",
      "max" : null,
      "min" : null,
      "required" : null,
      "tooltip" : null,
      "type" : null,
      "validation" : null,
      "value" : ""
    },
  "20" : { "custom" : null,
      "custom2" : null,
      "label" : "Szeroko%C5%9B%C4%87",
      "max" : "60",
      "min" : "0",
      "required" : "0",
      "tooltip" : "field17",
      "type" : "text",
      "validation" : "",
      "value" : ""
    },
  "21" : { "custom" : null,
      "custom2" : null,
      "label" : "divider",
      "max" : null,
      "min" : null,
      "required" : null,
      "tooltip" : null,
      "type" : "divider",
      "validation" : "divider",
      "value" : "Plik 2"
    },
  "22" : { "custom" : null,
      "custom2" : null,
      "label" : "Nazwa+Pliku+2",
      "max" : "60",
      "min" : "0",
      "required" : "0",
      "tooltip" : "field19",
      "type" : "text",
      "validation" : "",
      "value" : ""
    },
  "23" : { "custom" : null,
      "custom2" : null,
      "label" : "Ilo%C5%9B%C4%87",
      "max" : "60",
      "min" : "0",
      "required" : "0",
      "tooltip" : "field20",
      "type" : "text",
      "validation" : "",
      "value" : ""
    },
  "24" : { "custom" : null,
      "custom2" : null,
      "label" : "Szeroko%C5%9B%C4%87",
      "max" : "60",
      "min" : "0",
      "required" : "0",
      "tooltip" : "field21",
      "type" : "text",
      "validation" : "",
      "value" : ""
    },
  "25" : { "custom" : null,
      "custom2" : null,
      "label" : "Wysoko%C5%9B%C4%87",
      "max" : "60",
      "min" : "0",
      "required" : "0",
      "tooltip" : "field22",
      "type" : "text",
      "validation" : "",
      "value" : ""
    },
  "26" : { "custom" : null,
      "custom2" : null,
      "label" : "divider",
      "max" : null,
      "min" : null,
      "required" : null,
      "tooltip" : null,
      "type" : "divider",
      "validation" : "divider",
      "value" : "Plik 3"
    },
  "27" : { "custom" : null,
      "custom2" : null,
      "label" : "Nazwa+Pliku+3",
      "max" : "60",
      "min" : "0",
      "required" : "0",
      "tooltip" : "field24",
      "type" : "text",
      "validation" : "",
      "value" : ""
    },
  "28" : { "custom" : null,
      "custom2" : null,
      "label" : "Ilo%C5%9B%C4%87",
      "max" : "60",
      "min" : "0",
      "required" : "0",
      "tooltip" : "field25",
      "type" : "text",
      "validation" : "",
      "value" : ""
    },
  "29" : { "custom" : null,
      "custom2" : null,
      "label" : "Szeroko%C5%9B%C4%87",
      "max" : "60",
      "min" : "0",
      "required" : "0",
      "tooltip" : "field26",
      "type" : "text",
      "validation" : "",
      "value" : ""
    },
  "3" : { "custom" : null,
      "custom2" : null,
      "label" : "Nazwa+Firmy",
      "max" : "60",
      "min" : "0",
      "required" : "1",
      "tooltip" : "field0",
      "type" : "text",
      "validation" : "",
      "value" : "fdfdf"
    },
  "30" : { "custom" : null,
      "custom2" : null,
      "label" : "Wysoko%C5%9B%C4%87",
      "max" : "60",
      "min" : "0",
      "required" : "0",
      "tooltip" : "field27",
      "type" : "text",
      "validation" : "",
      "value" : ""
    },
  "31" : { "custom" : null,
      "custom2" : null,
      "label" : "divider",
      "max" : null,
      "min" : null,
      "required" : null,
      "tooltip" : null,
      "type" : "divider",
      "validation" : "divider",
      "value" : "Plik 4"
    },
  "32" : { "custom" : null,
      "custom2" : null,
      "label" : "Nazwa+Pliku+4",
      "max" : "60",
      "min" : "0",
      "required" : "0",
      "tooltip" : "field29",
      "type" : "text",
      "validation" : "",
      "value" : ""
    },
  "33" : { "custom" : null,
      "custom2" : null,
      "label" : "Ilo%C5%9B%C4%87",
      "max" : "60",
      "min" : "0",
      "required" : "0",
      "tooltip" : "field30",
      "type" : "text",
      "validation" : "",
      "value" : ""
    },
  "34" : { "custom" : null,
      "custom2" : null,
      "label" : "Szeroko%C5%9B%C4%87",
      "max" : "60",
      "min" : "0",
      "required" : "0",
      "tooltip" : "field31",
      "type" : "text",
      "validation" : "",
      "value" : ""
    },
  "35" : { "custom" : null,
      "custom2" : null,
      "label" : "Wysoko%C5%9B%C4%87",
      "max" : "60",
      "min" : "0",
      "required" : "0",
      "tooltip" : "field32",
      "type" : "text",
      "validation" : "",
      "value" : ""
    },
  "36" : { "custom" : null,
      "custom2" : null,
      "label" : "divider",
      "max" : null,
      "min" : null,
      "required" : null,
      "tooltip" : null,
      "type" : "divider",
      "validation" : "divider",
      "value" : "Plik 5"
    },
  "37" : { "custom" : null,
      "custom2" : null,
      "label" : "Nazwa+Pliku+5",
      "max" : "60",
      "min" : "0",
      "required" : "0",
      "tooltip" : "field34",
      "type" : "text",
      "validation" : "",
      "value" : ""
    },
  "38" : { "custom" : null,
      "custom2" : null,
      "label" : "Ilo%C5%9B%C4%87",
      "max" : "60",
      "min" : "0",
      "required" : "0",
      "tooltip" : "field35",
      "type" : "text",
      "validation" : "",
      "value" : ""
    },
  "39" : { "custom" : null,
      "custom2" : null,
      "label" : "Szeroko%C5%9B%C4%87",
      "max" : "60",
      "min" : "0",
      "required" : "0",
      "tooltip" : "field36",
      "type" : "text",
      "validation" : "",
      "value" : ""
    },
  "4" : { "custom" : null,
      "custom2" : null,
      "label" : "NIP",
      "max" : "10",
      "min" : "10",
      "required" : "0",
      "tooltip" : "field1",
      "type" : "text",
      "validation" : "integers",
      "value" : "1234567890"
    },
  "40" : { "custom" : null,
      "custom2" : null,
      "label" : "Wysoko%C5%9B%C4%87",
      "max" : "60",
      "min" : "0",
      "required" : "0",
      "tooltip" : "field37",
      "type" : "text",
      "validation" : "",
      "value" : ""
    },
  "41" : { "custom" : null,
      "custom2" : null,
      "label" : "Plik",
      "max" : "",
      "min" : "",
      "required" : "0",
      "tooltip" : "field38",
      "type" : "upload",
      "validation" : "file",
      "value" : "0"
    },
  "42" : { "custom" : null,
      "custom2" : null,
      "label" : "title",
      "max" : null,
      "min" : null,
      "required" : null,
      "tooltip" : null,
      "type" : null,
      "validation" : null,
      "value" : "Zamówienie"
    },
  "5" : { "custom" : null,
      "custom2" : null,
      "label" : "Imi%C4%99",
      "max" : "60",
      "min" : "0",
      "required" : "1",
      "tooltip" : "field2",
      "type" : "text",
      "validation" : "",
      "value" : "dfdf"
    },
  "6" : { "custom" : null,
      "custom2" : null,
      "label" : "Nazwisko",
      "max" : "60",
      "min" : "0",
      "required" : "1",
      "tooltip" : "field3",
      "type" : "text",
      "validation" : "",
      "value" : "dfdff"
    },
  "7" : { "custom" : "autoreply",
      "custom2" : "replyto",
      "label" : "Email",
      "max" : "",
      "min" : "",
      "required" : "1",
      "tooltip" : "field4",
      "type" : "email",
      "validation" : "email",
      "value" : "kasper@dolczewski.eu"
    },
  "8" : { "custom" : null,
      "custom2" : null,
      "label" : "Rodzaj+zam%C3%B3wienia",
      "max" : "",
      "min" : "",
      "required" : "0",
      "tooltip" : "field5",
      "type" : "dropdown",
      "validation" : "",
      "value" : "Druk sublimacyjny transferowy"
    },
  "9" : { "custom" : null,
      "custom2" : null,
      "label" : "Inne",
      "max" : "60",
      "min" : "0",
      "required" : "0",
      "tooltip" : "field6",
      "type" : "text",
      "validation" : "",
      "value" : ""
    }
}

そして、名前付きの入力ファイルを持つフォーム

<input type="text" name="Nazwa Firmy_text__1_0_60_field0" ng-style="{width: el.wid}" style="width: 100%;">
<span class="inst ng-binding" ng-style="{ fontSize: con[0].ifs+"px", color: con[0].ifc }" style=""></span>

各フィールドの名前は入力されたjsonデータに基づいて動的に生成されるため、jqueryまたはプラグインを使用してフォームに値を設定する最も簡単な方法は何ですか?

フィールドの名前を少し確認して json データと比較し、値を設定する方法はありますか?

4

1 に答える 1