# Advanced Components

Advanced Components are often Basic Components that have been extended to meet more complex requirements. You can find information for each of the Advanced Components like unique settings, JSON code, and field examples below:

{% embed url="<https://www.loom.com/share/776b416565a74111a1c99cf6bf3d1579>" %}

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Email</strong></td><td>Input field with validation ensuring email format.</td><td></td><td><a href="#email">#email</a></td></tr><tr><td><strong>URL</strong></td><td>Input field with validation ensuring a URL format.</td><td></td><td><a href="#url">#url</a></td></tr><tr><td><strong>Phone Number</strong></td><td>Input field with a mask that  allows numeric format.</td><td></td><td><a href="#phone-number">#phone-number</a></td></tr><tr><td><strong>Tags</strong></td><td>Catergorize items on your form or use for tags for  logic. </td><td></td><td><a href="#tags">#tags</a></td></tr><tr><td><strong>Address</strong></td><td>Input field with Location provider support for address lookup and map.</td><td></td><td><a href="#address">#address</a></td></tr><tr><td><strong>Date &#x26; Time</strong></td><td>Input or select a date and time for a calendar picker widget. </td><td></td><td><a href="#date-and-time">#date-and-time</a></td></tr><tr><td><strong>Day</strong></td><td>A three field component that represents Day/Month/Year.</td><td></td><td><a href="#day">#day</a></td></tr><tr><td><strong>Time</strong></td><td>Input to add a time or select a time from a predefined widget.</td><td></td><td><a href="#time-1">#time-1</a></td></tr><tr><td><strong>Currency</strong></td><td>Input field that supports many different currency types. </td><td></td><td><a href="#currency">#currency</a></td></tr><tr><td><strong>Survey</strong></td><td>Questions and correlated answers in survey format. </td><td></td><td><a href="#survey">#survey</a></td></tr><tr><td><strong>Signature</strong></td><td>Digitally sign on a signature pad. </td><td></td><td><a href="#signature">#signature</a></td></tr></tbody></table>

### Email

The Email component is a string field that carries special input validation ensuring the entered data is in a valid email format. A valid email address consists of an email prefix and an email domain, both in acceptable formats.&#x20;

{% tabs %}
{% tab title="Unique Settings" %}
**Realtime Kickbox.io Validation:** In addition to the normal email format validation, bring real-time Email validation through our integration with [**Kickbox.io**](https://kickbox.io/). For more information on how this works, please check out the [**Kickbox Integration**](https://help.form.io/developer/integrations/email/#kickbox) section.
{% endtab %}

{% tab title="Field Examples" %}
{% embed url="<https://codepen.io/JeriahFormio/pen/wvxRWQQ>" %}
{% endtab %}

{% tab title="Guidance" %}

* Use the Validate On 'Blur' setting to ensure validation formatting is only triggered when the user has left the field.&#x20;
* When using an Email action on your form, interpolate the email data and send off the email action to  the email address entered in the field

```
{{ data.email }}
```

{% endtab %}

{% tab title="JSON" %}

```
{
  "label": "Email",
  "tableView": true,
  "key": "email",
  "type": "email",
  "input": true
}
```

#### Specific Properties

| Property        | Description                                                      | Value   | Required | Default |
| --------------- | ---------------------------------------------------------------- | ------- | -------- | ------- |
| kickbox.enabled | If the Kickbox validation should be enabled for this email input | boolean | `false`  | `false` |

[**Click here for a full list of JSON Schema definitions**](https://github.com/formio/formio.js/wiki/Components-JSON-Schema#common-parameters)
{% endtab %}
{% endtabs %}

### URL

Similar to the Email field, the URL component is a string field that carries special input validation ensuring the entered data is in a valid URL format. Validation will check to see if the entered input data is at least in the correct format to potentially be a legitimate URL.

{% tabs %}
{% tab title="Unique Settings" %}
There are no unique settings for the URL component.
{% endtab %}

{% tab title="Field Examples" %}
{% embed url="<https://codepen.io/JeriahFormio/pen/abjPwVd>" %}
{% endtab %}

{% tab title="Guidance" %}

* Use the [**Validate On 'Blur'**](https://help.form.io/userguide/forms/form-building/component-settings#validate-on) setting to ensure validation formatting is only triggered when the user has left the field.&#x20;
  {% endtab %}

{% tab title="JSON" %}

```
{
  "label": "Url",
  "tableView": true,
  "key": "url",
  "type": "url",
  "input": true
}
```

[**Click here for a full list of JSON Schema definitions**](https://github.com/formio/formio.js/wiki/Components-JSON-Schema#common-parameters)
{% endtab %}
{% endtabs %}

### Phone Number

The Phone Number field carries an input mask to force the user to enter the field data in Phone Number format.

EG (123) 123-1234

{% tabs %}
{% tab title="Unique Settings" %}
There are no unique settings for the Phone Number component.
{% endtab %}

{% tab title="Field Examples" %}
{% embed url="<https://codepen.io/JeriahFormio/pen/bGjORmQ>" %}
{% endtab %}

{% tab title="Guidance" %}

* Use the [**Validate On 'Blur'**](https://help.form.io/userguide/forms/form-building/component-settings#validate-on) setting to ensure validation formatting is only triggered when the user has left the field.&#x20;
  {% endtab %}

{% tab title="JSON" %}

```
{
  "label": "Phone Number",
  "tableView": true,
  "key": "phoneNumber",
  "type": "phoneNumber",
  "input": true
}
```

#### Specific Properties

| Property  | Description                                 | Value              | Required | Default        |
| --------- | ------------------------------------------- | ------------------ | -------- | -------------- |
| inputMask | The input mask for this phone number input. | A valid input mask | `true`   | (999) 999-9999 |

[**Click here for a full list of JSON Schema definitions**](https://github.com/formio/formio.js/wiki/Components-JSON-Schema#common-parameters)
{% endtab %}
{% endtabs %}

### Tags

The Tag component draws attention to or categorizes elements on your form. Multiple tags can be added to one Tag field.&#x20;

{% tabs %}
{% tab title="Unique Settings" %}
**Delimiter:** The character used to separate tags

**Max Tags:** The maximum amount of tags that can be added.&#x20;

**Store As**: Determines how the tag data will be stored once submitted.&#x20;

String (CSV)

Array of Tags
{% endtab %}

{% tab title="Field Examples" %}
{% embed url="<https://codepen.io/JeriahFormio/pen/WNKLEvq>" %}
{% endtab %}

{% tab title="Guidance" %}

* **To draw attention to new, important content.** Tags can focus attention on important content that might otherwise be missed.
* **Business Logic.** Use tags to facilitate form-level or application-level logic and conditional workflows.
  {% endtab %}

{% tab title="JSON" %}

```
{
  "label": "Tags",
  "tableView": false,
  "key": "tags",
  "type": "tags",
  "input": true
}
```

[**Click here for a full list of JSON Schema definitions**](https://github.com/formio/formio.js/wiki/Components-JSON-Schema#common-parameters)
{% endtab %}
{% endtabs %}

### Address

The Address component is a special component that performs an address lookup based on user input using several map and location providers as well as Custom Provider support. Address data can also be entered in free form and will save the address as well as geolocation and other metadata.&#x20;

<details>

<summary>Google Map Integration Guide</summary>

<mark style="background-color:yellow;">Due to recent changes to the Google Maps API usage policies, an enabled Maps Javascript API and valid Maps API Key are required for all Address lookups using the Google Maps provider. Follow the instructions below to generate your Google Map API key.</mark>

1. Navigate to the [**Google Maps Platform** ](https://mapsplatform.google.com/)and click the **Get Started** button\
   \
   Follow the steps and Google will create a Project and Maps API key. Copy the **API key** and ensure you check the '**Enable all Google Maps API's for this project**' setting \
   \
   If you've never used the Google Cloud Platform before, follow the steps below to generate an API key.&#x20;

<img src="https://3305536326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPHoF2HwOA0s5HV_AIB%2Fuploads%2FJ3YYopE2fgO8z0gH6d2u%2Fimage.png?alt=media&#x26;token=7f8fc427-cb6e-45e1-822c-e80d50192b29" alt="" data-size="original">

2. Navigate to the Google Maps Platform and click the ' **Enabled API's and services**' tab to view enabled API's (ensure the Maps Javascript API is included in the 'API's and services' section)

![](https://3305536326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPHoF2HwOA0s5HV_AIB%2Fuploads%2FzHBh4kgK1xSWU4EIpCmA%2Fimage.png?alt=media\&token=16ba50c0-c86d-4b72-8f74-acecb7c11709)

3. Click the Credential tab to review or copy your Map API key if you did not do so in the previous step

![](https://lh5.googleusercontent.com/HRL9RVLHs4m64c3trTTdn5RIPPEM2gYXsyALGEMzs_goYiCYfM8Jc4Ssd_3dTGCMXBTaFXmeYZwflF87UCvs99Za_vgtxyJ6Y7T3-9gtLF5lOXVsqCm3MDVQpMjYrH-D7v82twvN5roovASNm6M_mNk)

It's advised to restrict your API key to prevent unauthorized usage. Edit your API key to add restriction parameters

![](https://lh3.googleusercontent.com/3iusk7k3E-F5fxEKqVqLUCceXyALbWSvksnDvxvhIkKK-cMZdoLSpaLILijYBwJ9KmJLBCcAAnrOSljBZN90zqUdPi9E-XQpv_pDBHkENB6msdKKoPq5_TOR6FpnLKnVbM-ojmfKDF2PjrXYTI-b7do)

4. Login to Form.io and add an **Address** component to a form
5. Inside the Address settings, click the **Provider** tab, select Google Maps, and paste your **Google Maps API key**

![](https://lh4.googleusercontent.com/NACOkorRMH9au3aZmHjizoEQE3sPNjCVnfusz2adw9hZYc5y9eZP3Fw9Ex8RnCR53r8rzRG5iofZzFjxHtO7kEVzbCGA9ggGSz0ptY65tDCXk0E2srJ7A19ldPbmcwGEL4dY6R3j-kEYllqHbCEYya4)

6. Use the form and the Address component will perform a lookup and populate results as the user inputs data into the field

![](https://lh6.googleusercontent.com/PPQDvat3xgzKy6fhLEZqtqH-1i_hvTYrxsgIu96EeR9Hy5CPwwyJZCSzHifFzvIFpPTyHhaj4tgZKdJwlLoS3h1GWd84NlMonv91pbsLMZ9-SY6TObtge_17CHQZ9EluTjC4ACilOv991OFyrsikFqg)

<br>

</details>

{% tabs %}
{% tab title="Unique Settings, Address" %}
**Enable Manual Mode:** Checking this setting adds a checkbox under the Address field. Should the user check this, the address lookup through the location provider is disabled, and the traditional address field will display for manual input (Address, City, State, Zip etc)

**Switch To Manual Mode Label:** The label of the checkbox used for the 'Enable Manual Mode' setting.&#x20;

**Disable Clear Icon:** Removes the 'x' clear icon found at the far right of the field. You may want to check this setting to prevent any users from accidentally clicking the icon.&#x20;

### **Providers**

Form.io is integrated with several Location and Map providers for fast and easy address lookup and geolocation data.&#x20;

**Azure Maps:** Set up your own [**Azure Map**](https://learn.microsoft.com/en-us/azure/azure-maps/) account and provide the subscription key to enable this map provider.&#x20;

**Open Street Map Nominatim:** [**Nominatim**](https://nominatim.org/release-docs/latest/) is a tool to search OSM data by name and address and to generate synthetic addresses of OSM points

**Custom:** Provides settings to integrate your own custom map provider.

**Google Maps:** Set up a Google Map API to utilize Google's location and map technology. Please see the documentation above for a full guide on integration setup with Form.io

**Manual Mode View String:** Specify the template to be used when querying the view string for component values entered in manual mode. This string is used in the table view, CSV export, and email rendering. When left blank combined value of all components joined with a comma will be used.
{% endtab %}

{% tab title="Field Examples" %}
{% embed url="<https://codepen.io/JeriahFormio/pen/QWBRxxW>" %}
{% endtab %}

{% tab title="Guidance" %}
Coming Soon...
{% endtab %}

{% tab title="JSON" %}

```
{
  "label": "Address",
  "tableView": false,
  "provider": "nominatim",
  "key": "address1",
  "type": "address",
  "providerOptions": {
    "params": {
      "autocompleteOptions": {}
    }
  },
  "input": true,
  "components": [
    {
      "label": "Address 1",
      "tableView": false,
      "key": "address1",
      "type": "textfield",
      "input": true,
      "customConditional": "show = _.get(instance, 'parent.manualMode', false);"
    },
    {
      "label": "Address 2",
      "tableView": false,
      "key": "address2",
      "type": "textfield",
      "input": true,
      "customConditional": "show = _.get(instance, 'parent.manualMode', false);"
    },
    {
      "label": "City",
      "tableView": false,
      "key": "city",
      "type": "textfield",
      "input": true,
      "customConditional": "show = _.get(instance, 'parent.manualMode', false);"
    },
    {
      "label": "State",
      "tableView": false,
      "key": "state",
      "type": "textfield",
      "input": true,
      "customConditional": "show = _.get(instance, 'parent.manualMode', false);"
    },
    {
      "label": "Country",
      "tableView": false,
      "key": "country",
      "type": "textfield",
      "input": true,
      "customConditional": "show = _.get(instance, 'parent.manualMode', false);"
    },
    {
      "label": "Zip Code",
      "tableView": false,
      "key": "zip",
      "type": "textfield",
      "input": true,
      "customConditional": "show = _.get(instance, 'parent.manualMode', false);"
    }
  ]
}
```

#### Specific Properties

| Property | Description                                                           | Value                                                                                                                                                                 | Required | Default |
| -------- | --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- |
| map      | A description of the map settings for configuring the Google Maps API | <ul><li><strong>map.region</strong> - The region configuration for the map.</li><li><strong>map.key</strong> - The API key for the Google Maps integration.</li></ul> | false    | {}      |

[**Click here for a full list of JSON Schema definitions**](https://github.com/formio/formio.js/wiki/Components-JSON-Schema#common-parameters)
{% endtab %}
{% endtabs %}

### Date & Time

The Date/Time component is a powerful and flexible option that supports advanced features such as validation, date range restrictions, and date calculations using [**Moment.js**](https://momentjs.com/docs/). It stores data as an ISO 8601 date, making it ideal for forms that require precise date/time handling, filtering, and validation. Due to its ISO-based format, it's also the preferred choice when timezone awareness is necessary.

<details>

<summary>What Type of Date/Time Field Should I Use?</summary>

Form.io provides two different Date and Time picker components: a string-based [**Textfield**](https://help.form.io/userguide/forms/form-building/basic-components#text-field) with an integrated Calendar Widget, and a dedicated Date/Time picker component. Choosing which component to use depends on the use case of your user base and application.&#x20;

**Textfield Component with Calendar Widget:** A string-based [**Textfield**](https://help.form.io/userguide/forms/form-building/basic-components#text-field) component with an integrated Calendar Widget. This component stores dates as plain strings, meaning the saved values remain fixed and do **not** adjust based on the user's location or timezone. When viewing the submitted data, it will appear exactly as entered, regardless of where or when it's viewed.

*Example: Birthday Field*

If you're designing a form that includes a field for users to select their birthday, the Textfield Calendar Widget is an ideal choice. Since the date is a static string, the birthday remains unchanged no matter where the submission is viewed or what timezone the viewer is in.

**Date/Time Component**

This component stores data as an ISO 8601 date, making it ideal for forms that require precise date/time handling, filtering, and validation. Due to its ISO-based format, it's also the preferred choice when timezone awareness is necessary.

*Example: Live Stream Event Field*\
If you're designing an invitation form that includes a date field indicating the time of an event, the Date/Time component is an ideal choice. Since the component uses the ISO date format, the event date and time can automatically adjust to match the viewer’s local timezone, informing the user of the correct event time based on their location.

</details>

{% tabs %}
{% tab title="Unique Settings" %}
**Display In Timezone:** This setting will determine how the user will view the captured Date/Time based on the type of Timezone value selected. These settings can dynamically change based on the user's location and setting type.&#x20;

<sup>***Of Viewer***</sup>\
Date/Time values will display in the viewer's local time zone, automatically adjusting according to the user's location. Use this setting when the value should display in the user's local time zone.

<sup>***Of Submission***</sup>\
Use this setting to maintain the submission’s original timezone. When the submission is viewed in a different timezone, an indicator will display within the field showing the original timezone.&#x20;

<sup>***Of Location***</sup>\
When this value is set, a new dropdown field will appear within the Date/Time component settings where a specific timezone is selected. Date/Time data will display based on the timezone location specified within the settings. When a submission is viewed from a location other than the set location, an indicator showing the set time zone will appear next to the value. Use this setting when the value should display in a set timezone.

<sup>***UTC***</sup>*&#x20;* \
Date/time values are displayed in UTC, ensuring a standardized reference point across all users and systems. This setting is ideal when uniformity is required, regardless of the viewer's local time zone. Use this setting when the value should consistently display in UTC.&#x20;

**Use Local Settings**: Use the Date/Time of your local machine

**Allow Manual Input:** Set by default, this setting will allow you to use your keyboard to input the value. When unchecked, the user will only be able to select the Date and Time from the calendar widget.

**Format:** The format the Date/Time will display in. By default, the format will be set to:

```
yyyy-MM-dd hh:mm a
```

Use formats provided by [**DateParser Codes**](https://github.com/angular-ui/bootstrap/tree/master/src/dateparser/docs#uibdateparsers-format-codes) for more options&#x20;

### Date

**Enable Date Input:** Enables selectable dates in the calendar widget and user input.

**Disable Specific Dates:** Blacklist certain dates by providing a date in the following format:

<pre><code><strong>(yyyy-MM-dd) or (yyyy-MM-dd - yyyy-MM-dd)
</strong></code></pre>

**Custom Disabled Dates:** Write Javascript to customize your disabled dates

```
// Disable all weekends
date.getDay() === 0 || date.getDay() === 6
```

**Disable Weekends/Weekdays:** Disables the selected days from the calendar picker.&#x20;

### Time

**Enable Time Input:** Enable or Disable the time input.

**Hour/Minute Increment:** Change the increment value when selecting a time from the Calendar Widget using the increment buttons.&#x20;

**12 Hour Time (AM/PM):** Display time in 12-hour time with AM/PM.

### Data

**Flatpickr options:** add new/override current Flatpickr options.

This field can be used to set the options of the Flatpickr library, which is used to create the datepicker widget. A full list of the options can be found [**here**](https://flatpickr.js.org/options/).

It can also be used to set a translation for the datepicker. To do so, the user has to provide a value to the `locale` variable. In the following example, translation is set to French with the shorthand name of the locale:

```json
{ "locale": "fr" }
```

A full list of the available locales and their shorthand names can be found [**here**](https://github.com/flatpickr/flatpickr/tree/master/src/l10n).

### Validation

**Default Date:** Set a default Date and Time when a user renders the form. Utilize Moment.JS to set dynamic date ranges.

For example, this code will set the date to 10 days before the current date by default

```
moment().subtract(10, 'days')
```

**Use Calendar To Set Min/Max Date:** Click in the setting field to open a Calendar to pick the minimum or maximum date.&#x20;

**Use Moment.js To Set Min/Max Date**: Check this if you would rather use Moment.js to set your dates rather than the calendar picker&#x20;
{% endtab %}

{% tab title="Field Examples" %}
{% embed url="<https://codepen.io/JeriahFormio/pen/OJwYdMw>" %}
{% endtab %}

{% tab title="Guidance" %}
Coming Soon...
{% endtab %}

{% tab title="JSON" %}

```
{
  "label": "Date / Time",
  "customClass": "pl-3 pr-3",
  "tableView": false,
  "datePicker": {
    "disableWeekends": false,
    "disableWeekdays": false
  },
  "enableMinDateInput": false,
  "enableMaxDateInput": false,
  "key": "dateTime",
  "type": "datetime",
  "input": true,
  "widget": {
    "type": "calendar",
    "displayInTimezone": "viewer",
    "locale": "en",
    "useLocaleSettings": false,
    "allowInput": true,
    "mode": "single",
    "enableTime": true,
    "noCalendar": false,
    "format": "yyyy-MM-dd hh:mm a",
    "hourIncrement": 1,
    "minuteIncrement": 1,
    "time_24hr": false,
    "minDate": null,
    "disableWeekends": false,
    "disableWeekdays": false,
    "maxDate": null
  }
}
```

[**Click here for a list of the Date/Time properties specific to this component**](https://github.com/formio/formio.js/wiki/DateTime-Component)

[**Click here for a full list of JSON Schema definitions**](https://github.com/formio/formio.js/wiki/Components-JSON-Schema#common-parameters)
{% endtab %}
{% endtabs %}

### Day

The Day component is used to enter values for the Day, Month, and Year using a number or select type of field.

{% tabs %}
{% tab title="Unique Settings" %}
**Hide Input Labels:** Hide the labels of component inputs. Labels will be visible when using the Form Builder but hidden when the form is rendered.&#x20;

**Type of Input:** Determines the type of input the user will use for the field:

* Number - Number input that represents the field
* Select - Select values representing the date option

**Hidden:** When checked, this specific field (day/month/year) will be hidden from the set of Day components. When a field is hidden, that value will be absent from the value as stored in the submission. For example, enabling **Hidden** on the component and entering *January 2024* will be saved as `01/2024`.

**Day First:** When checked, the day field will display first from the set of Day components.

**Placeholder:** Text displayed inside the field and removed when there is user input.

{% hint style="info" %}
Following the release of Form.io Enterprise 9.3.0, the value recorded for any unfilled field is an empty string (''). Prior to this release, empty fields were interpreted as '0'.
{% endhint %}
{% endtab %}

{% tab title="Field Examples" %}
{% embed url="<https://codepen.io/JeriahFormio/pen/MWBdLLe>" %}
{% endtab %}

{% tab title="Guidance" %}
Coming Soon...
{% endtab %}

{% tab title="JSON" %}

```
{
  "label": "Day",
  "hideInputLabels": false,
  "inputsLabelPosition": "top",
  "useLocaleSettings": false,
  "tableView": false,
  "fields": {
    "day": {
      "hide": false
    },
    "month": {
      "hide": false
    },
    "year": {
      "hide": false
    }
  },
  "key": "day",
  "type": "day",
  "input": true,
  "defaultValue": "00/00/0000"
}
```

The Date/Time has many unique properties, [**follow the link**](https://github.com/formio/formio.js/wiki/DateTime-Component) for more information.

[**Click here for a full list of JSON Schema definitions**](https://github.com/formio/formio.js/wiki/Components-JSON-Schema#common-parameters)
{% endtab %}
{% endtabs %}

### Time

A stand-alone time field for manual input or a time selector widget.&#x20;

{% tabs %}
{% tab title="Unique Settings" %}
**Input Type:** The type of widget the Time field will use:

HTML5, Text input with mask

**Format**: Set the formatting for the time when the Text input with mask setting is set.
{% endtab %}

{% tab title="Field Examples" %}
{% embed url="<https://codepen.io/JeriahFormio/pen/BaPqwqr>" %}
{% endtab %}

{% tab title="Guidance" %}
Coming Soon...
{% endtab %}

{% tab title="JSON" %}

```
{
  "label": "Time",
  "customClass": "pr-3 pl-3",
  "tableView": true,
  "key": "time",
  "type": "time",
  "input": true,
  "inputMask": "99:99"
}
```

| Property | Description                                       | Value                        | Required | Default |
| -------- | ------------------------------------------------- | ---------------------------- | -------- | ------- |
| format   | The time format for display of the captured time. | Any valid time format string | `true`   | `HH:mm` |

[**Click here for a full list of JSON Schema definitions**](https://github.com/formio/formio.js/wiki/Components-JSON-Schema#common-parameters)
{% endtab %}
{% endtabs %}

### Currency

Use the Currency component when a field needs to display monetary amounts. This component holds a numeric input mask that allows two decimal values and automatically adds commas as a user inputs a currency amount. The type of currency can also be selected which will change the prefix currency symbol.

{% tabs %}
{% tab title="Unique Settings" %}
**Currency:** The type of currency symbol and format the field will display when a user inputs into the field.&#x20;
{% endtab %}

{% tab title="Field Examples" %}
{% embed url="<https://codepen.io/JeriahFormio/pen/JjBqzGv>" %}
{% endtab %}

{% tab title="Guidance" %}
Coming Soon...
{% endtab %}

{% tab title="JSON" %}

```
{
  "label": "Currency",
  "mask": false,
  "spellcheck": true,
  "tableView": false,
  "currency": "USD",
  "inputFormat": "plain",
  "truncateMultipleSpaces": false,
  "key": "currency",
  "type": "currency",
  "input": true,
  "delimiter": true
}
```

[**Click here for a full list of JSON Schema definitions**](https://github.com/formio/formio.js/wiki/Components-JSON-Schema#common-parameters)
{% endtab %}
{% endtabs %}

### Survey

The Survey component works similarly to the [**Radio**](https://help.form.io/userguide/forms/form-building/basic-components#radio) component. Instead of one question, users are able to select a value for multiple questions which are configured within the component settings. Survey is a great component to utilize when asking multiple questions with the same context of answers or values.

{% tabs %}
{% tab title="Unique Settings" %}
**Questions:** The questions presented to the user, displayed vertically in the left-hand column

**Values:** Values are the answer that can be selected for each question.

**Tooltip:** Add a tooltip to any of the Questions or Values to help better communicate with your users.&#x20;
{% endtab %}

{% tab title="Field Examples" %}
{% embed url="<https://codepen.io/JeriahFormio/pen/GRBaerV>" %}
{% endtab %}

{% tab title="Guidance" %}
**Examples**

**Response Calculation:**

In some cases, you may want to set up logic on a Number field to calculate the average of the survey responses. To start, ensure the answers for your Survey component are represented by numeric values.

Add a Number field to your form and add the following logic:

```
value = Object.values(data.survey).reduce(function(sum, value) {  return sum + parseInt(value); }, 0);
```

{% hint style="info" %}
The data.**survey** within. code above is the Property Name of the Survey component
{% endhint %}

Navigate to [**https://formio.github.io/formio.js/app/sandbox**](https://formio.github.io/formio.js/app/sandbox) and use the following ID for a hands-on example:

631a5562621b15344c769e42&#x20;
{% endtab %}

{% tab title="JSON" %}

```
{
  "label": "Product Rating",
  "customClass": "pl-3 pr-3",
  "tableView": false,
  "questions": [
    {
      "label": "Ease of Use",
      "value": "easeOfUse",
      "tooltip": "Was our product easy to use without any problems?"
    },
    {
      "label": "Customer Support",
      "value": "customerSupport",
      "tooltip": "Was our customer support team timely and effective?"
    },
    {
      "label": "Onboarding Process",
      "value": "onboardingProcess",
      "tooltip": "Was our onboarding process easy to follow and execute?"
    }
  ],
  "values": [
    {
      "label": "Very Dissatisfied",
      "value": "1",
      "tooltip": ""
    },
    {
      "label": "Dissatisfied",
      "value": "2",
      "tooltip": ""
    },
    {
      "label": "No Opinion",
      "value": "3",
      "tooltip": ""
    },
    {
      "label": "Satisfied",
      "value": "4",
      "tooltip": ""
    },
    {
      "label": "Very Satisfied",
      "value": "5",
      "tooltip": ""
    }
  ],
  "key": "survey",
  "type": "survey",
  "input": true
}
```

#### Specific Properties

<table><thead><tr><th width="130">Property</th><th width="166">Description</th><th width="389">Value</th><th width="242">Required</th><th>Default</th></tr></thead><tbody><tr><td>questions</td><td>An array of question objects</td><td><p>An array of question objects, where each question object contains the following properties.</p><ul><li><strong>label</strong> - The label of the question.</li><li><strong>value</strong> - The value of this question used to store the value of this component.</li></ul></td><td><code>true</code></td><td>[]</td></tr><tr><td>values</td><td>An array of value objects</td><td><p>Array of value objects, where each item in the array has the following properties.</p><ul><li><strong>label</strong> - The label to show for this value</li><li><strong>value</strong> - The value of this radio input</li></ul></td><td><code>true</code></td><td>[]</td></tr></tbody></table>

[**Click here for a full list of JSON Schema definitions**](https://github.com/formio/formio.js/wiki/Components-JSON-Schema#common-parameters)
{% endtab %}
{% endtabs %}

### Signature

The Signature component allows the end-user to digitally sign a signature pad with either their finger on a touch-enabled device or with the mouse pointer.  When the form is submitted, the Signature pad will be converted into an image and stored with the form submission.

<figure><img src="https://3305536326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPHoF2HwOA0s5HV_AIB%2Fuploads%2Fpny3kt0cOl1p19ap5PWi%2Fsignature.jpg?alt=media&#x26;token=37786aec-4266-470d-ba85-ef279ee7b28c" alt=""><figcaption></figcaption></figure>

{% tabs %}
{% tab title="Unique Settings" %}
**Provider:** This dropdown will determine what kind of Signature pad to use.&#x20;

**Default:** Standard digital signature that can be signed upon form submission
{% endtab %}
{% endtabs %}
