> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scanova.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Form input fields

> Defines input field types and configurations used within the Custom Form Component. Each field type provides its own structure for validation, display, and data capture.

## Overview

The **Form Input Fields** schema defines the different types of form inputs supported by the [**Base Custom Form Component,**](/guides/category-components/components/_base_form) 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

| Property            | Type            | Required | Description                                                                                                  |
| :------------------ | :-------------- | :------- | :----------------------------------------------------------------------------------------------------------- |
| **multipleOptions** | `array<object>` | No       | Defines available options for multiple-choice or checkbox-type questions. Minimum: 1.                        |
| **linearScale**     | `object`        | No       | Defines a scale question with lower/upper limits and optional labels.                                        |
| **dateFormat**      | `string`        | No       | Defines the accepted date format for date-based inputs. Supported: `dd-MM-yyyy`, `MM-dd-yyyy`, `yyyy-MM-dd`. |
| **timeFormat**      | `string`        | No       | Defines the accepted time format for time-based inputs. Supported: `12h`, `24h`.                             |
| **feedback**        | `object`        | No       | Defines styling and layout for feedback-based fields like star rating, emoji, or like/dislike inputs.        |
| **uploadFile**      | `object`        | No       | Defines allowed file URL pattern for file upload questions.                                                  |
| **signature**       | `string`        | No       | Captures a digital signature as a base64 string or image reference.                                          |

***

### 🧩 **multipleOptions**

Used for:

* `multipleChoice`
* `checkbox`
* `dropdown`

| Sub-Property | Type     | Required | Description                                             |
| :----------- | :------- | :------- | :------------------------------------------------------ |
| **option**   | `string` | ✅ Yes    | Option text (max 500 chars). Supports up to 50 options. |

***

### 🧩 **linearScale**

Used for:

* `linearScale` question type (rating or scale-based feedback)

| Sub-Property        | Type      | Description                                         |
| :------------------ | :-------- | :-------------------------------------------------- |
| **lowerLimit**      | `integer` | Minimum value (≥ 0).                                |
| **lowerLimitLabel** | `string`  | Optional label for lower limit (e.g., “Poor”).      |
| **upperLimit**      | `integer` | Maximum value (≤ 10).                               |
| **upperLimitLabel** | `string`  | Optional 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 Type    | Allowed Values                           |
| :------------- | :--------------------------------------- |
| **dateFormat** | `dd-MM-yyyy`, `MM-dd-yyyy`, `yyyy-MM-dd` |
| **timeFormat** | `12h`, `24h`                             |

***

### 🧩 **feedback**

Used for:

* `starRating`
* `emoji`
* `likeDislike`

Supports reference to:

* `style/feedback.json` for visual styling.

***

### 🧩 **uploadFile**

Used for:

* `uploadFile` question type.

| Sub-Property | Type     | Description                                                                                      |
| :----------- | :------- | :----------------------------------------------------------------------------------------------- |
| **url**      | `string` | Must 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.

***

## Related Components

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

## Example Schema

<CodeGroup>
  ```json Schema theme={null}
  {
    "$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"
      }
    }
  }
  ```
</CodeGroup>

## 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`.
