Skip to main content
Form input types field.

Properties

  • multipleOptions (array of object (min: 1, max: ))
  • linearScale (object)
    • lowerLimit (integer) - minimum: 0
    • lowerLimitLabel (string) - maxLength: 100
    • upperLimit (integer) - maximum: 10
    • upperLimitLabel (string) - maxLength: 100
  • dateFormat (string) - enum: dd-MM-yyyy, MM-dd-yyyy, yyyy-MM-dd
  • timeFormat (string) - enum: 12h, 24h
  • feedback (object)
    • formatting (object - style component reference)
  • uploadFile (object)
    • url (string) - pattern: (https?://.*\.(png|jpeg|jpg|svg|gif|mp3|wav|aac|m4...
  • signature (string)

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"
    }
  }
}