Engine Fields
Questa pagina elenca i tipi di campo di input e gli attributi che aggiungono a quelli comuni.
TextField
{
"type" : "TextField" ,
"key" : "first_name" ,
"data_name" : "first_name" ,
"label" : "First name" ,
"display" : "default" ,
"description" : null ,
"description_mode" : null ,
"required" : false ,
"required_conditions" : null ,
"visible" : true ,
"visible_conditions" : null ,
"read_only" : false ,
"read_only_conditions" : null ,
"default_value" : null ,
"pattern" : null ,
"pattern_description" : null ,
"supporting_image" : false ,
"supporting_image_path" : null ,
"supporting_image_display" : null
}
Attributi aggiuntivi:
pattern: espressione regolare per validare l'input.
pattern_description: spiegazione facoltativa del pattern.
NumericField
{
"type" : "NumericField" ,
"key" : "age" ,
"data_name" : "age" ,
"label" : "Age" ,
"display" : "default" ,
"description" : null ,
"description_mode" : null ,
"required" : true ,
"required_conditions" : null ,
"visible" : true ,
"visible_conditions" : null ,
"read_only" : false ,
"read_only_conditions" : null ,
"default_value" : null ,
"min" : 0 ,
"max" : 120 ,
"format" : "integer" ,
"supporting_image" : false ,
"supporting_image_path" : null ,
"supporting_image_display" : null
}
Attributi aggiuntivi:
min: valore minimo consentito.
max: valore massimo consentito.
format: integer o float.
SingleChoiceField
{
"type" : "SingleChoiceField" ,
"key" : "city" ,
"data_name" : "city" ,
"label" : "City" ,
"display" : "default" ,
"description" : null ,
"description_mode" : null ,
"required" : true ,
"required_conditions" : null ,
"visible" : true ,
"visible_conditions" : null ,
"read_only" : false ,
"read_only_conditions" : null ,
"default_value" : null ,
"allow_other" : false ,
"choices" : [
{ "label" : "Paris" , "value" : "paris" },
{ "label" : "Rome" , "value" : "rome" }
],
"supporting_image" : false ,
"supporting_image_path" : null ,
"supporting_image_display" : null ,
"is_searchable" : false ,
"is_searchable_mode" : null
}
Attributi aggiuntivi:
choices: array di oggetti { label, value }.
allow_other: abilita un'opzione di testo libero.
is_searchable: abilita la ricerca negli elenchi lunghi.
is_searchable_mode: per ora default o null.
MultiChoiceField
{
"type" : "MultiChoiceField" ,
"key" : "foods" ,
"data_name" : "foods" ,
"label" : "Favorite foods" ,
"display" : "checkbox" ,
"description" : null ,
"description_mode" : null ,
"required" : false ,
"required_conditions" : null ,
"visible" : true ,
"visible_conditions" : null ,
"read_only" : false ,
"read_only_conditions" : null ,
"default_value" : [ "pasta" ],
"allow_other" : false ,
"choices" : [
{ "label" : "Pasta" , "value" : "pasta" },
{ "label" : "Pizza" , "value" : "pizza" }
],
"supporting_image" : false ,
"supporting_image_path" : null ,
"supporting_image_display" : null ,
"is_searchable" : false ,
"is_searchable_mode" : null
}
Attributi aggiuntivi:
choices: array di oggetti { label, value }.
allow_other: abilita elementi di testo libero.
display: default o checkbox.
BooleanField
{
"type" : "BooleanField" ,
"key" : "newsletter" ,
"data_name" : "newsletter" ,
"label" : "Subscribe?" ,
"display" : "default" ,
"description" : null ,
"description_mode" : null ,
"required" : false ,
"required_conditions" : null ,
"visible" : true ,
"visible_conditions" : null ,
"read_only" : false ,
"read_only_conditions" : null ,
"default_value" : null ,
"choices" : [
{ "label" : "Yes" , "value" : "yes" },
{ "label" : "No" , "value" : "no" }
],
"third_option_enabled" : false ,
"supporting_image" : false ,
"supporting_image_path" : null ,
"supporting_image_display" : null
}
Attributi aggiuntivi:
choices: Di solito due opzioni (sì/no).
third_option_enabled: Abilita una terza opzione neutra.
DateField
{
"type" : "DateField" ,
"key" : "visit_date" ,
"data_name" : "visit_date" ,
"label" : "Visit date" ,
"display" : "default" ,
"description" : null ,
"description_mode" : null ,
"required" : false ,
"required_conditions" : null ,
"visible" : true ,
"visible_conditions" : null ,
"read_only" : false ,
"read_only_conditions" : null ,
"default_value" : "now"
}
Attributi aggiuntivi:
default_value: now (o null).
TimeField
{
"type" : "TimeField" ,
"key" : "visit_time" ,
"data_name" : "visit_time" ,
"label" : "Visit time" ,
"display" : "default" ,
"description" : null ,
"description_mode" : null ,
"required" : false ,
"required_conditions" : null ,
"visible" : true ,
"visible_conditions" : null ,
"read_only" : false ,
"read_only_conditions" : null ,
"default_value" : "now"
}
Attributi aggiuntivi:
default_value: now (o null).
Choice values
I valori delle scelte devono rispettare ^[a-z0-9_]+$. Se una scelta non definisce un value,
form0-core ne genera uno a partire dall'etichetta.
Comunque venga impostato un valore, il record inviato usa lo stesso formato: SingleChoice/Boolean usa choice_value e other_value; MultiChoice usa choices_value e other_value. Vedi il contratto di aggiornamento dei valori .
Last modified on November 2, 2026