Import from JSON

You can create a form by uploading a JSON file instead of building it manually. This is useful for programmatic form generation, version-controlling form definitions, or migrating forms from another system.

How to import

  1. Go to Forms in the dashboard sidebar.
  2. Click the Import JSON button next to "New form".
  3. Select a .json file from your computer, or drag and drop it onto the button.
  4. A preview modal shows the form title, field count, group count, visibility, and status. Review the details.
  5. Click Import form. You will be redirected to the form builder where you can make any further edits before publishing.

Imported forms are always created as Draft regardless of the status field in the JSON.

JSON schema

{
  "title":       string,           // required
  "description": string,           // optional
  "visibility":  "PUBLIC" | "PRIVATE",  // default: "PUBLIC"
  "status":      "DRAFT" | "PUBLISHED", // default: "DRAFT"
  "expiresAt":   ISO 8601 datetime,     // optional
  "fields": [                      // top-level fields
    {
      "type":        FieldType,    // required — see Field types
      "label":       string,       // required
      "placeholder": string,       // optional
      "required":    boolean,      // default: false
      "order":       number,       // optional — inferred from array position
      "options": {                 // optional — choice fields only
        "choices": [
          { "label": string, "value": string }
        ]
      },
      "groupRef":    string        // optional — name of a group defined below
    }
  ],
  "groups": [
    {
      "label":      string,        // required
      "repeatable": boolean,       // default: false
      "order":      number,        // optional
      "fields": [                  // fields nested inside this group
        { ... }                    // same structure as top-level fields
      ]
    }
  ]
}

Supported field types

ValueDescription
SHORT_TEXTSingle-line text input
LONG_TEXTMulti-line textarea
MULTIPLE_CHOICERadio buttons — pick one
CHECKBOXESCheckboxes — pick many
DROPDOWNSelect element — pick one
DATEDate picker
EMAILEmail address input
NUMBERNumeric input
FILE_UPLOADFile picker
SECTION_HEADERVisual section divider (no answer collected)
COORDINATESLatitude + longitude pair

Full example

{
  "title": "Imaging Facility Survey",
  "description": "Annual survey of EuroBioImaging facilities.",
  "visibility": "PRIVATE",
  "fields": [
    {
      "type": "SHORT_TEXT",
      "label": "Your name",
      "required": true
    },
    {
      "type": "EMAIL",
      "label": "Your email",
      "required": true
    }
  ],
  "groups": [
    {
      "label": "Facility",
      "repeatable": true,
      "fields": [
        {
          "type": "SHORT_TEXT",
          "label": "Facility name",
          "required": true
        },
        {
          "type": "MULTIPLE_CHOICE",
          "label": "Imaging modality",
          "required": true,
          "options": {
            "choices": [
              { "label": "Light microscopy", "value": "light" },
              { "label": "Electron microscopy", "value": "electron" },
              { "label": "MRI", "value": "mri" }
            ]
          }
        },
        {
          "type": "COORDINATES",
          "label": "Facility location"
        }
      ]
    }
  ]
}