{
  "title": "Json FormElement Editor: {{SELECT id, \" \/ \", name FROM FormElement WHERE id = {{feId:S0}}}} (DB: {{dbNameQfq:Y}})",
  "noteInternal": "",
  "tableName": "Form",
  "primaryKey": "",
  "permitNew": "sip",
  "permitEdit": "sip",
  "restMethod": "",
  "escapeTypeDefault": "c",
  "render": "bootstrap",
  "requiredParameterNew": "",
  "requiredParameterEdit": "",
  "dirtyMode": "exclusive",
  "showButton": "new,delete,close,save",
  "multiMode": "none",
  "multiSql": "",
  "multiDetailForm": "",
  "multiDetailFormParameter": "",
  "forwardMode": "url-sip-skip-history",
  "forwardPage": "{{baseUrl:Y}}{{pageSlug:T}}?form={{form:SE}}&r={{id:R0}}&feid={{SELECT id FROM FormElement WHERE formId = {{id:R0}} ORDER BY id DESC LIMIT 1}}",
  "labelAlign": "default",
  "bsLabelColumns": "col-md-1",
  "bsInputColumns": "col-md-10",
  "bsNoteColumns": "col-md-1",
  "parameter": "dbIndex={{indexQfq:Y}}",
  "parameterLanguageA": "",
  "parameterLanguageB": "",
  "parameterLanguageC": "",
  "parameterLanguageD": "",
  "recordLockTimeoutSeconds": 900,
  "deleted": "no",
  "modified": "2023-03-29 13:50:08",
  "created": "2021-03-22 11:42:00",
  "FormElement_ff": [
    {
      "dynamicUpdate": "no",
      "encryption": "no",
      "encryptionMethod": "Default",
      "enabled": "yes",
      "name": "myFormElementName",
      "label": "Name",
      "mode": "show",
      "modeSql": "{{SELECT IF('{{feid:S0}}' = 0,'required','readonly' ) }}",
      "class": "native",
      "type": "text",
      "subrecordOption": "",
      "encode": "specialchar",
      "checkType": "auto",
      "checkPattern": "",
      "onChange": "",
      "ord": 10,
      "tabindex": 0,
      "size": "",
      "maxLength": "",
      "labelAlign": "default",
      "bsLabelColumns": "",
      "bsInputColumns": "",
      "bsNoteColumns": "",
      "rowLabelInputNote": "row,label,\/label,input,\/input,note,\/note,\/row",
      "note": "",
      "adminNote": "",
      "tooltip": "",
      "placeholder": "",
      "value": "{{SELECT name FROM FormElement WHERE id = {{feid:S0}} }}",
      "sql1": "",
      "parameter": "",
      "parameterLanguageA": "",
      "parameterLanguageB": "",
      "parameterLanguageC": "",
      "parameterLanguageD": "",
      "clientJs": "",
      "feGroup": "",
      "deleted": "no",
      "modified": "2023-03-29 13:50:08",
      "created": "2023-03-28 13:08:52"
    },
    {
      "dynamicUpdate": "no",
      "encryption": "no",
      "encryptionMethod": "Default",
      "enabled": "yes",
      "name": "myJson",
      "label": "JSON",
      "mode": "show",
      "modeSql": "{{ SELECT IF({{feid:S0}}=0,'readonly','show') }}",
      "class": "native",
      "type": "text",
      "subrecordOption": "",
      "encode": "none",
      "checkType": "all",
      "checkPattern": "",
      "onChange": "",
      "ord": 20,
      "tabindex": 0,
      "size": "1,6",
      "maxLength": "",
      "labelAlign": "default",
      "bsLabelColumns": "",
      "bsInputColumns": "",
      "bsNoteColumns": "",
      "rowLabelInputNote": "row,label,\/label,input,\/input,note,\/note,\/row",
      "note": "#!report\r\n\r\n# Use Data URI to download given base64 encoded json string as text file\r\n\r\n10.sql = SELECT CONCAT('<a download=\"',(SELECT name FROM FormElement WHERE id = {{feid:SE}}),'.json\" class=\"btn btn-default\" href=\"data:application\/octet-stream;base64,')\r\n                  ,'fid:{{r:S0}}|feid:{{feid:S0}}|b64' AS _formElementJson                  \r\n                  , '\"><i class=\"fas fa-file-download\"><\/i><\/a>'\r\n               FROM (SELECT '') AS _fake WHERE {{feid:S0}}!=0",
      "adminNote": "",
      "tooltip": "",
      "placeholder": "",
      "value": "#!report\r\n\r\n10.sql = SELECT 'fid:{{id:R0}}|feid:{{feid:S0}}' AS _formElementJson FROM (SELECT 1) AS _fake WHERE {{feid:S0}} != 0\r\n\r\n15.sql = SELECT IF({{feid:S0}}=0, 'Please save this formelement first.', '')",
      "sql1": "",
      "parameter": "",
      "parameterLanguageA": "",
      "parameterLanguageB": "",
      "parameterLanguageC": "",
      "parameterLanguageD": "",
      "clientJs": "",
      "feGroup": "",
      "deleted": "no",
      "modified": "2023-03-29 14:06:14",
      "created": "2021-03-22 11:44:22"
    },
    {
      "dynamicUpdate": "no",
      "encryption": "no",
      "encryptionMethod": "Default",
      "enabled": "yes",
      "name": "myFormJson",
      "label": "",
      "mode": "show",
      "modeSql": "",
      "class": "native",
      "type": "extra",
      "subrecordOption": "",
      "encode": "specialchar",
      "checkType": "auto",
      "checkPattern": "",
      "onChange": "",
      "ord": 30,
      "tabindex": 0,
      "size": "",
      "maxLength": "",
      "labelAlign": "default",
      "bsLabelColumns": "",
      "bsInputColumns": "",
      "bsNoteColumns": "",
      "rowLabelInputNote": "row,label,\/label,input,\/input,note,\/note,\/row",
      "note": "",
      "adminNote": "",
      "tooltip": "",
      "placeholder": "",
      "value": "#!report\r\n\r\n10.sql=SELECT 'fid:{{id:R0}}' AS _formJson",
      "sql1": "",
      "parameter": "",
      "parameterLanguageA": "",
      "parameterLanguageB": "",
      "parameterLanguageC": "",
      "parameterLanguageD": "",
      "clientJs": "",
      "feGroup": "",
      "deleted": "no",
      "modified": "2023-03-29 13:50:08",
      "created": "2023-03-27 12:45:56"
    },
    {
      "dynamicUpdate": "no",
      "encryption": "no",
      "encryptionMethod": "Default",
      "enabled": "yes",
      "name": "mySlave",
      "label": "mySlave",
      "mode": "show",
      "modeSql": "",
      "class": "action",
      "type": "afterSave",
      "subrecordOption": "",
      "encode": "specialchar",
      "checkType": "auto",
      "checkPattern": "",
      "onChange": "",
      "ord": 40,
      "tabindex": 0,
      "size": "",
      "maxLength": "",
      "labelAlign": "default",
      "bsLabelColumns": "",
      "bsInputColumns": "",
      "bsNoteColumns": "",
      "rowLabelInputNote": "row,label,\/label,input,\/input,note,\/note,\/row",
      "note": "",
      "adminNote": "",
      "tooltip": "",
      "placeholder": "",
      "value": "",
      "sql1": "",
      "parameter": "slaveId = {{SELECT id FROM FormElement WHERE id = {{feid:S0}} }}\r\nsqlInsert = {{INSERT INTO FormElement (formId, name)\r\nSELECT {{id:R0}}, '{{myFormElementName:FE:alnumx}}'\r\nFROM (SELECT 1) AS _fake }}\r\nsqlUpdate={{UPDATE FormElement SET formId={{id:R0}} WHERE id = {{feid:S0}} }}",
      "parameterLanguageA": "",
      "parameterLanguageB": "",
      "parameterLanguageC": "",
      "parameterLanguageD": "",
      "clientJs": "",
      "feGroup": "",
      "deleted": "no",
      "modified": "2023-03-29 13:50:08",
      "created": "2023-03-28 13:17:15"
    },
    {
      "dynamicUpdate": "no",
      "encryption": "no",
      "encryptionMethod": "Default",
      "enabled": "yes",
      "name": "save Json",
      "label": "save Json",
      "mode": "show",
      "modeSql": "",
      "class": "action",
      "type": "afterSave",
      "subrecordOption": "",
      "encode": "specialchar",
      "checkType": "auto",
      "checkPattern": "",
      "onChange": "",
      "ord": 50,
      "tabindex": 0,
      "size": "",
      "maxLength": "",
      "labelAlign": "default",
      "bsLabelColumns": "",
      "bsInputColumns": "",
      "bsNoteColumns": "",
      "rowLabelInputNote": "row,label,\/label,input,\/input,note,\/note,\/row",
      "note": "",
      "adminNote": "",
      "tooltip": "",
      "placeholder": "",
      "value": "",
      "sql1": "",
      "parameter": "saveFormJson={{myJson:FE:all:S}}\r\nsaveFormJsonName={{SELECT name FROM Form WHERE id = {{id:R0}} }}",
      "parameterLanguageA": "",
      "parameterLanguageB": "",
      "parameterLanguageC": "",
      "parameterLanguageD": "",
      "clientJs": "",
      "feGroup": "",
      "deleted": "no",
      "modified": "2023-03-29 13:50:08",
      "created": "2021-03-24 14:44:04"
    },
    {
      "dynamicUpdate": "no",
      "encryption": "no",
      "encryptionMethod": "Default",
      "enabled": "yes",
      "name": "Check for double formelement name",
      "label": "Check for double formelement name",
      "mode": "show",
      "modeSql": "",
      "class": "action",
      "type": "beforeSave",
      "subrecordOption": "",
      "encode": "specialchar",
      "checkType": "auto",
      "checkPattern": "",
      "onChange": "",
      "ord": 60,
      "tabindex": 0,
      "size": "",
      "maxLength": "",
      "labelAlign": "default",
      "bsLabelColumns": "",
      "bsInputColumns": "",
      "bsNoteColumns": "",
      "rowLabelInputNote": "row,label,\/label,input,\/input,note,\/note,\/row",
      "note": "",
      "adminNote": "",
      "tooltip": "",
      "placeholder": "",
      "value": "",
      "sql1": "",
      "parameter": "sqlValidate={{!SELECT f.id FROM FormElement AS f WHERE  f.name!=\"\" AND f.name=\"{{myFormElementName:F:alnumx}}\" AND f.formId = {{id:R0}} }}\r\nexpectRecords=0\r\nmessageFail=There is already another formelement with the name \"{{myFormElementName:F:alnumx}}\".",
      "parameterLanguageA": "",
      "parameterLanguageB": "",
      "parameterLanguageC": "",
      "parameterLanguageD": "",
      "clientJs": "",
      "feGroup": "",
      "deleted": "no",
      "modified": "2023-03-29 13:50:08",
      "created": "2021-03-30 09:14:48"
    }
  ]
}