Skip to main content

Overview

The Form Input Fields schema defines the different types of form inputs supported by the Base Custom Form Component, including text responses, choice-based questions, date/time pickers, feedback ratings, file uploads, and digital signatures. Each input type comes with specific validation rules, constraints, and style references to maintain a consistent experience across all form-based QR Code categories.

Properties

PropertyTypeRequiredDescription
multipleOptionsarray<object>NoDefines available options for multiple-choice or checkbox-type questions. Minimum: 1.
linearScaleobjectNoDefines a scale question with lower/upper limits and optional labels.
dateFormatstringNoDefines the accepted date format for date-based inputs. Supported: dd-MM-yyyy, MM-dd-yyyy, yyyy-MM-dd.
timeFormatstringNoDefines the accepted time format for time-based inputs. Supported: 12h, 24h.
feedbackobjectNoDefines styling and layout for feedback-based fields like star rating, emoji, or like/dislike inputs.
uploadFileobjectNoDefines allowed file URL pattern for file upload questions.
signaturestringNoCaptures a digital signature as a base64 string or image reference.

🧩 multipleOptions

Used for:
  • multipleChoice
  • checkbox
  • dropdown
Sub-PropertyTypeRequiredDescription
optionstring✅ YesOption text (max 500 chars). Supports up to 50 options.

🧩 linearScale

Used for:
  • linearScale question type (rating or scale-based feedback)
Sub-PropertyTypeDescription
lowerLimitintegerMinimum value (≥ 0).
lowerLimitLabelstringOptional label for lower limit (e.g., “Poor”).
upperLimitintegerMaximum value (≤ 10).
upperLimitLabelstringOptional label for upper limit (e.g., “Excellent”).

🧩 dateFormat & timeFormat

Used for:
  • dateFormat and timeFormat question types.
    Defines standardized display and validation formats across form submissions.
Format TypeAllowed Values
dateFormatdd-MM-yyyy, MM-dd-yyyy, yyyy-MM-dd
timeFormat12h, 24h

🧩 feedback

Used for:
  • starRating
  • emoji
  • likeDislike
Supports reference to:
  • style/feedback.json for visual styling.

🧩 uploadFile

Used for:
  • uploadFile question type.
Sub-PropertyTypeDescription
urlstringMust be a valid URL pointing to an allowed file format (.png, .jpeg, .pdf, .docx, etc.).

🧩 signature

Used for:
  • signature question type.
    Stores signature data as a base64 string or file reference.

  • Custom Form Component → Uses this schema to define question structures and supported input types.

Example Schema

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Form input fields",
  "description": "Form input types field.",
  "type": "object",
  "properties": {
    "multipleOptions": {
      "type": "array",
      "minItems": 1,
      "$comment": "Allow upto 50 choices.",
      "additionalProperties": false,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "option"
        ],
        "properties": {
          "option": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        }
      }
    },
    "linearScale": {
      "type": "object",
      "additionalProperties": false,
      "$comment": "Linear scale with lower limit and upper limit.",
      "properties": {
        "lowerLimit": {
          "type": "integer",
          "minimum": 0
        },
        "lowerLimitLabel": {
          "type": "string",
          "maxLength": 100
        },
        "upperLimit": {
          "type": "integer",
          "maximum": 10
        },
        "upperLimitLabel": {
          "type": "string",
          "maxLength": 100
        }
      }
    },
    "dateFormat": {
      "type": "string",
      "enum": [
        "dd-MM-yyyy",
        "MM-dd-yyyy",
        "yyyy-MM-dd"
      ]
    },
    "timeFormat": {
      "type": "string",
      "enum": [
        "12h",
        "24h"
      ]
    },
    "feedback": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "formatting": {
          "$ref": "style/feedback.json"
        }
      }
    },
    "uploadFile": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "url": {
          "type": "string",
          "pattern": "(https?://.*\\.(png|jpeg|jpg|svg|gif|mp3|wav|aac|m4a|pdf|doc|docx|xls|xlsx|ppt|pptx|odt|ods|odp|txt|csv|js|PNG|JPEG|JPG|SVG|GIF|MP3|WAV|AAC|M4A|PDF|DOC|DOCX|XLS|XLSX|PPT|PPTX|ODT|ODS|ODP|TXT|CSV|JS))$"
        }
      }
    },
    "signature": {
      "type": "string"
    }
  }
}

Notes

  • This schema supports all question types used in Custom Form Components.
  • Each field type includes its own structure and constraints for flexible configuration.
  • Always validate the selected type in the parent form component before applying data from this schema.
  • For advanced styling, reference visual components like style/text.json or style/feedback.json.