{
  "title": "{{SELECT CONCAT('FormWizard: ' ,f.name) FROM Form AS f WHERE f.id = '{{formId:SE}}'}}",
  "noteInternal": "",
  "tableName": "FormElement",
  "primaryKey": "",
  "permitNew": "sip",
  "permitEdit": "sip",
  "restMethod": "",
  "escapeTypeDefault": "c",
  "render": "bootstrap",
  "requiredParameterNew": "",
  "requiredParameterEdit": "formId, tableName",
  "dirtyMode": "exclusive",
  "showButton": "close,save",
  "multiMode": "horizontal",
  "multiSql": "# Select all FormElement which exists\r\n{{!SELECT IFNULL(fe.id, 0) AS _id\r\n        , IF(fe.id != 0, 1, 0) AS _processRow\r\n        , col.COLUMN_NAME AS _columnName -- get Column name and save in Parent Store \r\n        , col.DATA_TYPE AS _dataType -- get data type and save in Parent Store\r\n    FROM FormElement AS fe\r\n      LEFT JOIN INFORMATION_SCHEMA.COLUMNS AS col\r\n        ON col.TABLE_NAME = '{{tableName:SE}}'\r\n        AND fe.name = col.COLUMN_NAME\r\n        AND col.TABLE_SCHEMA = '{{dbNameData:Y}}'\r\n    WHERE fe.formId = '{{formId:S0}}'\r\n      \r\n# Combine results and avoid duplicates    \r\n  UNION\r\n      \r\n# Select column which are not saved as FormElement\r\n  SELECT IFNULL(fe.id, 0) AS _id\r\n      , IF(fe.id != 0, 1, 0) AS processRow\r\n      , col.COLUMN_NAME AS _columnName\r\n      , col.DATA_TYPE AS _dataType\r\n    FROM INFORMATION_SCHEMA.COLUMNS AS col\r\n      LEFT JOIN FormElement AS fe\r\n        ON fe.name = col.COLUMN_NAME \r\n        AND fe.formId = '{{formId:S0}}'\r\n    WHERE col.TABLE_NAME = '{{tableName:SE}}'\r\n      AND col.TABLE_SCHEMA = '{{dbNameData:Y}}'\r\n      AND col.COLUMN_NAME NOT IN('id', 'created', 'modified')\r\n    \r\n}}",
  "multiDetailForm": "",
  "multiDetailFormParameter": "",
  "forwardMode": "url-sip",
  "forwardPage": "{{pageSlug:T}}?form=FormWizard&formId={{formId:S0}}&tableName={{tableName:SE}}",
  "labelAlign": "default",
  "bsLabelColumns": "",
  "bsInputColumns": "",
  "bsNoteColumns": "",
  "parameter": "processRow\r\nmultiFormAddRow=1\r\nmultiFormDeleteRow=1",
  "parameterLanguageA": "",
  "parameterLanguageB": "",
  "parameterLanguageC": "",
  "parameterLanguageD": "",
  "recordLockTimeoutSeconds": 900,
  "deleted": "no",
  "modified": "2024-06-27 15:14:04",
  "created": "2024-05-15 09:14:21",
  "FormElement_ff": [
    {
      "dynamicUpdate": "no",
      "encryption": "no",
      "encryptionMethod": "Default",
      "enabled": "yes",
      "name": "createPill",
      "label": "",
      "mode": "show",
      "modeSql": "",
      "class": "action",
      "type": "afterSave",
      "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": "",
      "sql1": "",
      "parameter": "slaveId = {{SELECT fePill.id FROM FormElement AS fePill WHERE fePill.formId = '{{formId:RS0}}' AND (fePill.name = '{{myPill:FE:alnumx}}' OR '{{myPill:FE:alnumx}}' = '' ) AND fePill.class = 'container' UNION SELECT -1 WHERE NOT EXISTS (SELECT 1 FROM FormElement AS fePill WHERE fePill.formId = '{{formId:RS0}}' AND (fePill.name = '{{myPill:FE:alnumx}}' OR '{{myPill:FE:alnumx}}' = '') AND fePill.class = 'container')}}\r\n\r\nsqlInsert = {{INSERT INTO FormElement (formId, name, label, class, type) VALUES({{formId:RS0}}, '{{myPill:FE:alnumx}}','{{myPill:FE:alnumx}}' ,'container', 'pill') }}",
      "parameterLanguageA": "",
      "parameterLanguageB": "",
      "parameterLanguageC": "",
      "parameterLanguageD": "",
      "clientJs": "",
      "virtual": "",
      "deleted": "no",
      "modified": "2024-06-26 14:28:35",
      "created": "2024-05-17 08:57:00"
    },
    {
      "dynamicUpdate": "no",
      "encryption": "no",
      "encryptionMethod": "Default",
      "enabled": "yes",
      "name": "updatePill",
      "label": "",
      "mode": "show",
      "modeSql": "",
      "class": "action",
      "type": "afterSave",
      "subrecordOption": "",
      "encode": "specialchar",
      "checkType": "auto",
      "checkPattern": "",
      "onChange": "",
      "ord": 20,
      "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 fePill.id FROM FormElement AS fePill WHERE fePill.formId = '{{formId:RS0}}' AND fePill.name = '{{myPill:FE:alnumx}}' AND fePill.class = 'container' UNION ALL SELECT 1 AS id LIMIT 1}}\r\n\r\nsqlUpdate = {{UPDATE FormElement SET feIdContainer = CASE WHEN '{{slaveId:V}}' = 1 THEN 0 ELSE '{{slaveId:V}}' END WHERE id = '{{id:R0}}' }}",
      "parameterLanguageA": "",
      "parameterLanguageB": "",
      "parameterLanguageC": "",
      "parameterLanguageD": "",
      "clientJs": "",
      "virtual": "",
      "deleted": "no",
      "modified": "2024-06-26 10:46:29",
      "created": "2024-05-17 08:57:23"
    },
    {
      "dynamicUpdate": "no",
      "encryption": "no",
      "encryptionMethod": "Default",
      "enabled": "yes",
      "name": "Check conflict",
      "label": "",
      "mode": "show",
      "modeSql": "",
      "class": "action",
      "type": "beforeSave",
      "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": "",
      "sql1": "",
      "parameter": "fillStoreVar = {{!SELECT 'beforeLoad,beforeSave,beforeInsert,beforeUpdate,beforeDelete,afterLoad,afterSave,afterInsert,afterUpdate,afterDelete,sendMail,paste' AS actionFE , 'fieldset,pill,templateGroup' AS containerFE}}\r\n\r\nsqlValidate = {{!SELECT fe.id FROM FormElement AS fe WHERE fe.class = CASE WHEN FIND_IN_SET('{{type:FE:alnumx}}', '{{actionFE:VE}}') > 0 THEN 'action' WHEN FIND_IN_SET('{{type:FE:alnumx}}', '{{containerFE:VE}}') > 0 THEN 'container' ELSE   'native' END AND fe.formId={{formId:RF}} AND fe.name!=\"\" AND fe.name=\"{{name:RF:alnumx}}\" AND fe.enabled=\"yes\" AND fe.id!={{id:R0}} }}\r\n\r\nexpectRecords = 0\r\n\r\nmessageFail = There is already another {{class:RFE:alnumx}} form element with name \"{{name:RF:alnumx}}\".",
      "parameterLanguageA": "",
      "parameterLanguageB": "",
      "parameterLanguageC": "",
      "parameterLanguageD": "",
      "clientJs": "",
      "virtual": "",
      "deleted": "no",
      "modified": "2024-06-27 16:11:23",
      "created": "2024-06-07 10:40:03"
    },
    {
      "dynamicUpdate": "no",
      "encryption": "no",
      "encryptionMethod": "Default",
      "enabled": "yes",
      "name": "name",
      "label": "name",
      "mode": "show",
      "modeSql": "",
      "class": "native",
      "type": "text",
      "subrecordOption": "",
      "encode": "specialchar",
      "checkType": "all",
      "checkPattern": "",
      "onChange": "",
      "ord": 40,
      "tabindex": 0,
      "size": "10",
      "maxLength": "",
      "labelAlign": "default",
      "bsLabelColumns": "",
      "bsInputColumns": "",
      "bsNoteColumns": "",
      "rowLabelInputNote": "row,label,\/label,input,\/input,note,\/note,\/row",
      "note": "",
      "adminNote": "",
      "tooltip": "",
      "placeholder": "",
      "value": "{{name:RE:::{{_columnName:PE}}}}",
      "sql1": "",
      "parameter": "",
      "parameterLanguageA": "",
      "parameterLanguageB": "",
      "parameterLanguageC": "",
      "parameterLanguageD": "",
      "clientJs": "",
      "virtual": "",
      "deleted": "no",
      "modified": "2024-06-27 10:34:27",
      "created": "2024-05-15 10:52:17"
    },
    {
      "dynamicUpdate": "no",
      "encryption": "no",
      "encryptionMethod": "Default",
      "enabled": "yes",
      "name": "label",
      "label": "label",
      "mode": "show",
      "modeSql": "",
      "class": "native",
      "type": "text",
      "subrecordOption": "",
      "encode": "specialchar",
      "checkType": "auto",
      "checkPattern": "",
      "onChange": "",
      "ord": 50,
      "tabindex": 0,
      "size": "10",
      "maxLength": "",
      "labelAlign": "default",
      "bsLabelColumns": "",
      "bsInputColumns": "",
      "bsNoteColumns": "",
      "rowLabelInputNote": "row,label,\/label,input,\/input,note,\/note,\/row",
      "note": "",
      "adminNote": "",
      "tooltip": "",
      "placeholder": "",
      "value": "{{label:RE:::{{columnName:VE}}}}",
      "sql1": "",
      "parameter": "# Set the first letter in uppercase\r\nfillStoreVar = {{!SELECT CONCAT(UPPER(SUBSTRING('{{_columnName:PE}}', 1, 1)),SUBSTRING('{{_columnName:PE}}', 2)) AS columnName}}",
      "parameterLanguageA": "",
      "parameterLanguageB": "",
      "parameterLanguageC": "",
      "parameterLanguageD": "",
      "clientJs": "",
      "virtual": "",
      "deleted": "no",
      "modified": "2024-06-27 10:34:15",
      "created": "2024-05-15 10:52:35"
    },
    {
      "dynamicUpdate": "no",
      "encryption": "no",
      "encryptionMethod": "Default",
      "enabled": "yes",
      "name": "type",
      "label": "type",
      "mode": "show",
      "modeSql": "",
      "class": "native",
      "type": "select",
      "subrecordOption": "",
      "encode": "specialchar",
      "checkType": "all",
      "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": "{{type:RE:alnumx::{{SELECT \r\n                      CASE \r\n                        WHEN UPPER('{{_dataType:PE:alnumx}}') IN ('CHAR', 'VARCHAR', 'TEXT', 'TINYTEXT', 'MEDIUMTEXT', 'LONGTEXT', 'INT', 'FLOAT', 'DOUBLE') THEN 'text'\r\n                        WHEN UPPER('{{_dataType:PE:alnumx}}') IN ('DATE') THEN 'date'\r\n                        WHEN UPPER('{{_dataType:PE:alnumx}}') IN ('TIME') THEN 'time'\r\n                        WHEN UPPER('{{_dataType:PE:alnumx}}') IN ('DATETIME') THEN 'datetime'\r\n                        WHEN UPPER('{{_dataType:PE:alnumx}}') IN ('ENUM') THEN 'checkbox'\r\n                      ELSE 'text'\r\n                    END}}\r\n}}",
      "sql1": "",
      "parameter": "# initialize itemlist for type\r\nitemList={{SELECT IF( \"{{class:FRD0:alnumx}}\"=\"native\",\"checkbox,date,time,datetime,extra,text,editor,annotate,imageAdjust,note,password,radio,select,subrecord,upload,chat\", IF(\"{{class:FRD0:alnumx}}\"=\"action\",\"beforeLoad,beforeSave,beforeInsert,beforeUpdate,beforeDelete,afterLoad,afterSave,afterInsert,afterUpdate,afterDelete,sendMail,paste\", \"fieldset,pill,templateGroup\")  ) }}",
      "parameterLanguageA": "",
      "parameterLanguageB": "",
      "parameterLanguageC": "",
      "parameterLanguageD": "",
      "clientJs": "",
      "virtual": "",
      "deleted": "no",
      "modified": "2024-06-26 14:17:15",
      "created": "2024-05-15 10:53:16"
    },
    {
      "dynamicUpdate": "no",
      "encryption": "no",
      "encryptionMethod": "Default",
      "enabled": "no",
      "name": "class",
      "label": "Class",
      "mode": "show",
      "modeSql": "",
      "class": "native",
      "type": "select",
      "subrecordOption": "",
      "encode": "specialchar",
      "checkType": "auto",
      "checkPattern": "",
      "onChange": "",
      "ord": 70,
      "tabindex": 0,
      "size": "",
      "maxLength": "",
      "labelAlign": "default",
      "bsLabelColumns": "",
      "bsInputColumns": "",
      "bsNoteColumns": "",
      "rowLabelInputNote": "row,label,\/label,input,\/input,note,\/note,\/row",
      "note": "",
      "adminNote": "",
      "tooltip": "",
      "placeholder": "",
      "value": "{{class:FSRD0:alnumx}}",
      "sql1": "",
      "parameter": "itemList = native, action, container",
      "parameterLanguageA": "",
      "parameterLanguageB": "",
      "parameterLanguageC": "",
      "parameterLanguageD": "",
      "clientJs": "",
      "virtual": "",
      "deleted": "no",
      "modified": "2024-06-27 15:43:46",
      "created": "2024-06-10 14:34:47"
    },
    {
      "dynamicUpdate": "no",
      "encryption": "no",
      "encryptionMethod": "Default",
      "enabled": "yes",
      "name": "mode",
      "label": "mode",
      "mode": "show",
      "modeSql": "",
      "class": "native",
      "type": "select",
      "subrecordOption": "",
      "encode": "specialchar",
      "checkType": "all",
      "checkPattern": "",
      "onChange": "",
      "ord": 80,
      "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": "itemList = show,required,readonly,hidden",
      "parameterLanguageA": "",
      "parameterLanguageB": "",
      "parameterLanguageC": "",
      "parameterLanguageD": "",
      "clientJs": "",
      "virtual": "",
      "deleted": "no",
      "modified": "2024-06-26 10:46:59",
      "created": "2024-05-15 10:54:43"
    },
    {
      "dynamicUpdate": "no",
      "encryption": "no",
      "encryptionMethod": "Default",
      "enabled": "yes",
      "name": "sql1",
      "label": "sql1",
      "mode": "show",
      "modeSql": "",
      "class": "native",
      "type": "editor",
      "subrecordOption": "",
      "encode": "none",
      "checkType": "all",
      "checkPattern": "",
      "onChange": "",
      "ord": 90,
      "tabindex": 0,
      "size": "100,0",
      "maxLength": "",
      "labelAlign": "default",
      "bsLabelColumns": "",
      "bsInputColumns": "",
      "bsNoteColumns": "",
      "rowLabelInputNote": "row,label,\/label,input,\/input,note,\/note,\/row",
      "note": "",
      "adminNote": "",
      "tooltip": "",
      "placeholder": "",
      "value": "",
      "sql1": "",
      "parameter": "editorType=codemirror",
      "parameterLanguageA": "",
      "parameterLanguageB": "",
      "parameterLanguageC": "",
      "parameterLanguageD": "",
      "clientJs": "",
      "virtual": "",
      "deleted": "no",
      "modified": "2024-07-01 13:24:00",
      "created": "2024-05-15 10:55:26"
    },
    {
      "dynamicUpdate": "no",
      "encryption": "no",
      "encryptionMethod": "Default",
      "enabled": "yes",
      "name": "parameter",
      "label": "Parameter",
      "mode": "show",
      "modeSql": "",
      "class": "native",
      "type": "editor",
      "subrecordOption": "",
      "encode": "none",
      "checkType": "all",
      "checkPattern": "",
      "onChange": "",
      "ord": 100,
      "tabindex": 0,
      "size": "100,0",
      "maxLength": "",
      "labelAlign": "default",
      "bsLabelColumns": "",
      "bsInputColumns": "",
      "bsNoteColumns": "",
      "rowLabelInputNote": "row,label,\/label,input,\/input,note,\/note,\/row",
      "note": "",
      "adminNote": "",
      "tooltip": "",
      "placeholder": "",
      "value": "",
      "sql1": "",
      "parameter": "editorType=codemirror\r\ncodemirror-keywords-qfq-base=acceptZeroAsRequired autofocus capture accept downloadButton fileSplit uploadType maxFileSize fileDestination fileTrash fileTrashText fileReplace autoOrient autoOrientCmd autoOrientMimeType chmodFile chmodDir slaveId sqlBefore sqlInsert sqlUpdate sqlDelete sqlAfter importToTable importToColumns importRegion importMode importType importNamedSheetsOnly importSetReadDataOnly importListSheetNames checkBoxMode checked unchecked label2 itemList emptyHide emptyItemAtStart emptyItemAtEnd buttonClass dateFormat data-pattern-error data-required-error data-match-error data-error decimalFormat htmlAfter htmlBefore extraButtonLock extraButtonPassword extraButtonInfo extraButtonInfoClass extraButtonInfoMinWidth editor-plugins editor-toolbar editor-statusbar fileButtonText fillStoreVar page title extraDeleteForm detail new subrecordTableClass subrecordTableAttribute min max processReadOnly retype retypeLabel retypeNote characterCountWrap hideZero emptyMeansNull showSeconds showZero timeIsOptional typeAheadLimit typeAheadInitialSuggestion typeAheadMinLength typeAheadSql typeAheadSqlPrefetch typeAheadPedantic typeAheadTag typeAheadGlueInsert typeAheadGlueDelete typeAheadTagInsert typeAheadTagDelimiter wrapRow wrapLabel wrapInput wrapNote trim sqlValidate requiredList expectRecords messageFail dataReference requiredPosition indicateRequired minWidth clearMe defaultValue qfqLog alert inputType step textareaResize htmlAllow subrecordColumnTitleEdit subrecordColumnTitleDelete subrecordAppendSql subrecordAppendClass subrecordAppendForm subrecordAppendExtraDeleteForm subrecordAppendEmptyText orderInterval dndTable orderColumn editorType editor-forced_root_block editor-extended_valid_elements editor-content_css codemirror-mode codemirror-lineNumbers codemirror-lineWrapping codemirror-tabSize codemirror-styleActiveLine codemirror-matchBrackets codemirror-autocloseBrackets codemirror-keywords-qfq-base codemirror-keywords-qfq-level codemirror-keywords-sql-function codemirror-tableColumns sendMailTo sendMailCc sendMailBcc sendMailFrom sendMailSubject sendMailReplyTo sendMailAttachment sendMailHeader sendMailFlagAutoSubmit sendMailGrId sendMailXId sendMailXId2 sendMailXId3 sendMailMode sendMailSubjectHtmlEntity sendMailBodyHtmlEntity",
      "parameterLanguageA": "",
      "parameterLanguageB": "",
      "parameterLanguageC": "",
      "parameterLanguageD": "",
      "clientJs": "",
      "virtual": "",
      "deleted": "no",
      "modified": "2024-07-01 10:44:57",
      "created": "2024-05-15 10:55:54"
    },
    {
      "dynamicUpdate": "no",
      "encryption": "no",
      "encryptionMethod": "Default",
      "enabled": "yes",
      "name": "myPill",
      "label": "pill",
      "mode": "show",
      "modeSql": "",
      "class": "native",
      "type": "text",
      "subrecordOption": "",
      "encode": "specialchar",
      "checkType": "auto",
      "checkPattern": "",
      "onChange": "",
      "ord": 110,
      "tabindex": 0,
      "size": "10",
      "maxLength": "",
      "labelAlign": "default",
      "bsLabelColumns": "",
      "bsInputColumns": "",
      "bsNoteColumns": "",
      "rowLabelInputNote": "row,label,\/label,input,\/input,note,\/note,\/row",
      "note": "",
      "adminNote": "",
      "tooltip": "",
      "placeholder": "",
      "value": "{{SELECT fePill.name \r\n    FROM FormElement AS fePill\r\n    WHERE fePill.id = '{{feIdContainer:R0}}'\r\n}}",
      "sql1": "",
      "parameter": "",
      "parameterLanguageA": "",
      "parameterLanguageB": "",
      "parameterLanguageC": "",
      "parameterLanguageD": "",
      "clientJs": "",
      "virtual": "",
      "deleted": "no",
      "modified": "2024-06-27 10:34:49",
      "created": "2024-05-15 10:55:06"
    }
  ]
}