JSON_GEN_FORM
Generate Flutter forms using JSON, featuring a variety of built-in form controls,
support for validation, custom layouts, custom styles, and unlimited nested form grouping.
English · 中文
Except for group
, row
, and col
, all types have the following general parameters. All types have extra
.
Field |
Description |
Type |
Default Value |
Required |
type |
Type |
String |
'' |
true |
field |
Field Name |
String |
'' |
true |
label |
Label |
String |
- |
- |
hiddenLabel |
Hidden Label |
bool |
false |
- |
value |
Default Value |
dynamic |
- |
- |
disabled |
Disabled |
bool |
false |
- |
readonly |
Read-Only |
bool |
false |
- |
rules |
Validation Rules |
List |
[] |
- |
extra |
Extra Params |
dynamic |
|
- |
Field |
Description |
Type |
Default Value |
Required |
type |
Type |
String |
'group' |
true |
field |
Field Name |
String |
'' |
- |
label |
Label |
String |
'' |
- |
hiddenLabel |
Hidden Label |
bool |
'' |
- |
children |
Sub-Forms |
List |
[] |
- |
Field |
Description |
Type |
Default Value |
Required |
type |
Type |
String |
'text' |
true |
placeholder |
Placeholder |
String |
- |
- |
General Params |
- |
- |
- |
- |
Field |
Description |
Type |
Default Value |
Required |
type |
Type |
String |
'password' |
true |
placeholder |
Placeholder |
String |
- |
- |
General Params |
- |
- |
- |
- |
Field |
Description |
Type |
Default Value |
Required |
type |
Type |
String |
'textarea' |
true |
placeholder |
Placeholder |
String |
- |
- |
General Params |
- |
- |
- |
- |
Field |
Description |
Type |
Default Value |
Required |
type |
Type |
String |
'number' |
true |
placeholder |
Placeholder |
String |
- |
- |
General Params |
- |
- |
- |
- |
Field |
Description |
Type |
Default Value |
Required |
type |
Type |
String |
'radio' |
true |
options |
Options |
List |
[] |
- |
direction |
Options Direction |
String |
'horizontal' |
- |
itemHorizontalSpace |
Item Horizontal Space |
double |
16 |
- |
itemVerticalSpace |
Item Vertical Space |
double |
8 |
- |
General Params |
- |
- |
- |
- |
Field |
Description |
Type |
Default Value |
Required |
type |
Type |
String |
'checkbox' |
true |
options |
Options |
List |
[] |
- |
direction |
Options Direction |
String |
'horizontal' |
- |
itemHorizontalSpace |
Item Horizontal Space |
double |
16 |
- |
itemVerticalSpace |
Item Vertical Space |
double |
8 |
- |
General Params |
- |
- |
- |
- |
Field |
Description |
Type |
Default Value |
Required |
type |
Type |
String |
'select' |
true |
options |
Options |
List |
[] |
- |
multiple |
Multiple Select |
bool |
false |
- |
General Params |
- |
- |
- |
- |
Field |
Description |
Type |
Default Value |
Required |
type |
Type |
String |
'switch' |
true |
General Params |
- |
- |
- |
- |
Field |
Description |
Type |
Default Value |
Required |
type |
Type |
String |
'media' |
true |
mediaType |
Media Type (media, image, video) |
String |
'media' |
- |
multiple |
Multiple Uploads |
bool |
false |
- |
General Params |
- |
- |
- |
- |
ios Configuration info.plist
<key>NSCameraUsageDescription</key>
<string>Need camera for taking photos or scanning codes</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Need access to photo library for selecting photos or videos</string>
<key>NSMicrophoneUsageDescription</key>
<string>Need microphone access for recording videos</string>
android Configuration AndroidManifest.xml
<uses-permission android:name="android.permission.CAMERA" />
Field |
Description |
Type |
Default Value |
Required |
type |
Type |
String |
'date' |
true |
Field |
Description |
Type |
Default Value |
Required |
type |
Type |
String |
'time' |
true |
Field |
Description |
Type |
Default Value |
Required |
type |
Type |
String |
'datetime' |
true |
row
's children
must have type
as col
.
Field |
Description |
Type |
Default Value |
Required |
type |
Type |
String |
'row' |
true |
gutter |
Spacing |
double |
0 |
- |
children |
Children |
List |
[] |
- |
col
's parent must be row
.
Field |
Description |
Type |
Default Value |
Required |
type |
Type |
String |
'col' |
true |
flex |
Flex |
int |
1 |
- |
child |
Child Config |
Map |
|
|
Field |
Description |
Type |
Default Value |
Required |
type |
Type |
String |
'group' |
true |
field |
Field Name |
String |
null |
- |
- required
- type: Shortcut validation type, only supported for text input
- min: For string type, it's string length; for number type, it's a specific number; for array type, it's array length
- max: For string type, it's string length; for number type, it's a specific number; for array type, it's array length
- len: For string type, it's string length; for number type, it's a specific number; for array type, it's array length
- pattern: Regex validation
- message: Error message