updated form fields and application logic;
This commit is contained in:
413
src/tempData.js
413
src/tempData.js
@@ -95,22 +95,22 @@ export const formData = {
|
||||
label: 'La forma per Innovazione digitale 2024',
|
||||
content: [
|
||||
{
|
||||
"id": "aec5ee1885",
|
||||
"id": "a9a8aeb479",
|
||||
"name": "textinput",
|
||||
"label": "Text Input",
|
||||
"label": "Testo Breve",
|
||||
"settings": [
|
||||
{
|
||||
"name": "label",
|
||||
"value": "Text input"
|
||||
"value": "Testo Breve"
|
||||
},
|
||||
{
|
||||
"name": "placeholder",
|
||||
"value": "Placeholder text"
|
||||
"value": ""
|
||||
}
|
||||
],
|
||||
"validators": {
|
||||
"isRequired": false,
|
||||
"minLength": null,
|
||||
"isRequired": true,
|
||||
"minLength": "3",
|
||||
"maxLength": null,
|
||||
"pattern": null,
|
||||
"custom": null
|
||||
@@ -118,17 +118,17 @@ export const formData = {
|
||||
"dbId": 1
|
||||
},
|
||||
{
|
||||
"id": "a730f1f4d0",
|
||||
"id": "a20469fc97",
|
||||
"name": "textarea",
|
||||
"label": "Text Area",
|
||||
"label": "Testo Lungo",
|
||||
"settings": [
|
||||
{
|
||||
"name": "label",
|
||||
"value": "Text area"
|
||||
"value": "Testo Lungo"
|
||||
},
|
||||
{
|
||||
"name": "placeholder",
|
||||
"value": "Placeholder text"
|
||||
"value": ""
|
||||
}
|
||||
],
|
||||
"validators": {
|
||||
@@ -141,69 +141,46 @@ export const formData = {
|
||||
"dbId": 2
|
||||
},
|
||||
{
|
||||
"id": "aa8746a7c3",
|
||||
"name": "textinput",
|
||||
"label": "P.IVA",
|
||||
"id": "a21dc560f6",
|
||||
"name": "wysiwyg",
|
||||
"label": "Campo di Testo Formattato",
|
||||
"settings": [
|
||||
{
|
||||
"name": "label",
|
||||
"value": "P.IVA"
|
||||
},
|
||||
{
|
||||
"name": "placeholder",
|
||||
"value": "Insert p.iva number"
|
||||
}
|
||||
],
|
||||
"validators": {
|
||||
"isRequired": true,
|
||||
"minLength": null,
|
||||
"maxLength": null,
|
||||
"pattern": null,
|
||||
"custom": "isValidVAT"
|
||||
},
|
||||
"dbId": 4
|
||||
},
|
||||
{
|
||||
"id": "ae3dde17cd",
|
||||
"name": "radio",
|
||||
"label": "Radio Input",
|
||||
"settings": [
|
||||
{
|
||||
"name": "label",
|
||||
"value": "Radio input"
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"value": [
|
||||
{
|
||||
"name": "opt1",
|
||||
"label": "Opt1"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"validators": {
|
||||
"isRequired": false,
|
||||
"min": null,
|
||||
"max": null,
|
||||
"custom": null
|
||||
},
|
||||
"dbId": 5
|
||||
},
|
||||
{
|
||||
"id": "abf838016f",
|
||||
"name": "textinput",
|
||||
"label": "Number Input",
|
||||
"settings": [
|
||||
{
|
||||
"name": "label",
|
||||
"value": "Number"
|
||||
"value": "Testo Formattato"
|
||||
},
|
||||
{
|
||||
"name": "placeholder",
|
||||
"value": ""
|
||||
}
|
||||
],
|
||||
"validators": {
|
||||
"isRequired": false,
|
||||
"minLength": null,
|
||||
"maxLength": null,
|
||||
"pattern": null,
|
||||
"custom": null
|
||||
},
|
||||
"dbId": 3
|
||||
},
|
||||
{
|
||||
"id": "a5c3860c1a",
|
||||
"name": "numberinput",
|
||||
"label": "Campo Numerico",
|
||||
"settings": [
|
||||
{
|
||||
"name": "label",
|
||||
"value": "Numero"
|
||||
},
|
||||
{
|
||||
"name": "placeholder",
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"name": "step",
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"validators": {
|
||||
"isRequired": false,
|
||||
"min": null,
|
||||
@@ -211,7 +188,146 @@ export const formData = {
|
||||
"pattern": null,
|
||||
"custom": null
|
||||
},
|
||||
"dbId": 3
|
||||
"dbId": 4
|
||||
},
|
||||
{
|
||||
"id": "a7252ecc8d",
|
||||
"name": "radio",
|
||||
"label": "Scelta Singola",
|
||||
"settings": [
|
||||
{
|
||||
"name": "label",
|
||||
"value": "Scelta Singola"
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"value": [
|
||||
{
|
||||
"name": "o8df4ffa62",
|
||||
"label": "Radio opzione A"
|
||||
},
|
||||
{
|
||||
"name": "o3ed6fb4d8",
|
||||
"label": "Radio opzione B"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"validators": {
|
||||
"isRequired": true,
|
||||
"custom": null
|
||||
},
|
||||
"dbId": 5
|
||||
},
|
||||
{
|
||||
"id": "a778783c9d",
|
||||
"name": "select",
|
||||
"label": "Menu a Tendina",
|
||||
"settings": [
|
||||
{
|
||||
"name": "label",
|
||||
"value": "Menu a Tendina"
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"value": [
|
||||
{
|
||||
"name": "od9f50d8a8",
|
||||
"label": "Opzione A"
|
||||
},
|
||||
{
|
||||
"name": "o8cb208732",
|
||||
"label": "Opzione B"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"validators": {
|
||||
"isRequired": false,
|
||||
"custom": null
|
||||
},
|
||||
"dbId": 6
|
||||
},
|
||||
{
|
||||
"id": "afee29df1a",
|
||||
"name": "switch",
|
||||
"label": "Casella di Spunta",
|
||||
"settings": [
|
||||
{
|
||||
"name": "label",
|
||||
"value": "Casella di Spunta"
|
||||
}
|
||||
],
|
||||
"validators": {
|
||||
"isRequired": false
|
||||
},
|
||||
"dbId": 8
|
||||
},
|
||||
{
|
||||
"id": "a5fdbd77df",
|
||||
"name": "checkboxes",
|
||||
"label": "Scelta Multipla",
|
||||
"settings": [
|
||||
{
|
||||
"name": "label",
|
||||
"value": "Scelta Multipla"
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"value": [
|
||||
{
|
||||
"name": "o55ea20665",
|
||||
"label": "Opz checkbox A"
|
||||
},
|
||||
{
|
||||
"name": "oc10db3d79",
|
||||
"label": "Opz checkbox B"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"validators": {
|
||||
"isRequired": true,
|
||||
"custom": null
|
||||
},
|
||||
"dbId": 7
|
||||
},
|
||||
{
|
||||
"id": "a2810fd8a1",
|
||||
"name": "fileupload",
|
||||
"label": "Caricamento File",
|
||||
"settings": [
|
||||
{
|
||||
"name": "label",
|
||||
"value": "Caricamento File"
|
||||
},
|
||||
{
|
||||
"name": "mime",
|
||||
"value": ['image/jpeg', 'image/png']
|
||||
}
|
||||
],
|
||||
"validators": {
|
||||
"isRequired": true,
|
||||
"maxSize": 100000,
|
||||
"custom": null
|
||||
},
|
||||
"dbId": 10
|
||||
},
|
||||
{
|
||||
"id": "ae14c94da7",
|
||||
"name": "datepicker",
|
||||
"label": "Data",
|
||||
"settings": [
|
||||
{
|
||||
"name": "label",
|
||||
"value": "Data"
|
||||
}
|
||||
],
|
||||
"validators": {
|
||||
"isRequired": true,
|
||||
"custom": null
|
||||
},
|
||||
"dbId": 9
|
||||
}
|
||||
]
|
||||
};
|
||||
@@ -219,16 +335,18 @@ export const formData = {
|
||||
export const elementItems = [
|
||||
{
|
||||
id: 1,
|
||||
sortOrder: 1,
|
||||
name: 'textinput',
|
||||
label: 'Text Input',
|
||||
label: 'Testo Breve',
|
||||
description: 'Per risposte concise (nomi, titoli, brevi descrizioni)',
|
||||
settings: [
|
||||
{
|
||||
name: "label",
|
||||
value: "Text input"
|
||||
value: "Testo Breve"
|
||||
},
|
||||
{
|
||||
name: "placeholder",
|
||||
value: "Placeholder text"
|
||||
value: ""
|
||||
}
|
||||
],
|
||||
validators: {
|
||||
@@ -241,16 +359,18 @@ export const elementItems = [
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
sortOrder: 2,
|
||||
name: 'textarea',
|
||||
label: 'Text Area',
|
||||
label: 'Testo Lungo',
|
||||
description: 'Campo di testo esteso per paragrafi, descrizioni, proposte',
|
||||
settings: [
|
||||
{
|
||||
name: "label",
|
||||
value: "Text area"
|
||||
value: "Testo Lungo"
|
||||
},
|
||||
{
|
||||
name: "placeholder",
|
||||
value: "Placeholder text"
|
||||
value: ""
|
||||
}
|
||||
],
|
||||
validators: {
|
||||
@@ -263,15 +383,44 @@ export const elementItems = [
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: 'numberinput',
|
||||
label: 'Number Input',
|
||||
sortOrder: 3,
|
||||
name: 'wysiwyg',
|
||||
label: 'Campo di Testo Formattato',
|
||||
description: 'Editor avanzato per testo con formattazione',
|
||||
settings: [
|
||||
{
|
||||
name: "label",
|
||||
value: "Number"
|
||||
value: "Testo Formattato"
|
||||
},
|
||||
{
|
||||
name: "placeholder",
|
||||
value: ""
|
||||
}
|
||||
],
|
||||
validators: {
|
||||
isRequired: false,
|
||||
minLength: null,
|
||||
maxLength: null,
|
||||
custom: null
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
sortOrder: 4,
|
||||
name: 'numberinput',
|
||||
label: 'Campo Numerico',
|
||||
description: "Per l'inserimento di valori numerici (quantità, importi, percentuali)",
|
||||
settings: [
|
||||
{
|
||||
name: "label",
|
||||
value: "Numero"
|
||||
},
|
||||
{
|
||||
name: "placeholder",
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
name: "step",
|
||||
value: 0
|
||||
}
|
||||
],
|
||||
@@ -283,43 +432,20 @@ export const elementItems = [
|
||||
custom: null
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: 'textinput',
|
||||
label: 'P.IVA',
|
||||
settings: [
|
||||
{
|
||||
name: "label",
|
||||
value: "P.IVA"
|
||||
},
|
||||
{
|
||||
name: "placeholder",
|
||||
value: "Insert p.iva number"
|
||||
}
|
||||
],
|
||||
validators: {
|
||||
isRequired: true,
|
||||
minLength: null,
|
||||
maxLength: null,
|
||||
pattern: null,
|
||||
custom: 'isValidVAT'
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
sortOrder: 5,
|
||||
name: 'radio',
|
||||
label: 'Radio Input',
|
||||
label: 'Scelta Singola',
|
||||
description: 'Gruppo di opzioni per selezione singola',
|
||||
settings: [
|
||||
{
|
||||
name: "label",
|
||||
value: "Radio input"
|
||||
value: "Scelta Singola"
|
||||
},
|
||||
{
|
||||
name: "options",
|
||||
value: [
|
||||
{ name: "opt1", label: "Opt1" },
|
||||
{ name: "opt2", label: "Opt2" }
|
||||
]
|
||||
value: []
|
||||
}
|
||||
],
|
||||
validators: {
|
||||
@@ -329,19 +455,18 @@ export const elementItems = [
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
sortOrder: 6,
|
||||
name: 'select',
|
||||
label: 'Select',
|
||||
label: 'Menu a Tendina',
|
||||
description: 'Selezione da opzioni predefinite',
|
||||
settings: [
|
||||
{
|
||||
name: "label",
|
||||
value: "Select"
|
||||
value: "Menu a Tendina"
|
||||
},
|
||||
{
|
||||
name: "options",
|
||||
value: [
|
||||
{ name: "opt1", label: "Opt1" },
|
||||
{ name: "opt2", label: "Opt2" }
|
||||
]
|
||||
value: []
|
||||
}
|
||||
],
|
||||
validators: {
|
||||
@@ -351,21 +476,85 @@ export const elementItems = [
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
name: 'datepicker',
|
||||
label: 'Datepicker',
|
||||
sortOrder: 7,
|
||||
name: 'checkboxes',
|
||||
label: 'Scelta Multipla',
|
||||
description: 'Gruppo di opzioni per selezione singola o multipla',
|
||||
settings: [
|
||||
{
|
||||
name: "label",
|
||||
value: "Datepicker"
|
||||
value: "Scelta Multipla"
|
||||
},
|
||||
{
|
||||
name: "options",
|
||||
value: []
|
||||
}
|
||||
],
|
||||
validators: {
|
||||
isRequired: false,
|
||||
min: null,
|
||||
max: null,
|
||||
custom: null
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
sortOrder: 8,
|
||||
name: 'switch',
|
||||
label: 'Casella di Spunta',
|
||||
description: 'Per selezioni binarie, accettazioni, conferme',
|
||||
settings: [
|
||||
{
|
||||
name: "label",
|
||||
value: "Casella di Spunta"
|
||||
}
|
||||
],
|
||||
validators: {
|
||||
isRequired: false
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
sortOrder: 9,
|
||||
name: 'datepicker',
|
||||
label: 'Data',
|
||||
description: 'Selezione di data',
|
||||
settings: [
|
||||
{
|
||||
name: "label",
|
||||
value: "Data"
|
||||
}
|
||||
],
|
||||
validators: {
|
||||
isRequired: false,
|
||||
custom: null
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
sortOrder: 10,
|
||||
name: 'fileupload',
|
||||
label: 'Caricamento File',
|
||||
description: "Per l'upload di documenti o immagini",
|
||||
settings: [
|
||||
{
|
||||
name: "label",
|
||||
value: "Caricamento File"
|
||||
},
|
||||
{
|
||||
name: "mime",
|
||||
value: []
|
||||
}
|
||||
],
|
||||
validators: {
|
||||
isRequired: false,
|
||||
maxSize: 100000,
|
||||
custom: null
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
/*
|
||||
const flowData = {
|
||||
"initialForm":9,
|
||||
"finalForm":13,
|
||||
@@ -412,4 +601,4 @@ const flowData = {
|
||||
"type":"smoothstep"
|
||||
}
|
||||
]
|
||||
}
|
||||
}*/
|
||||
|
||||
Reference in New Issue
Block a user