# About Form Components

> A Form component provides you the ability to collect user data. The UI components are grouped into categories, based on their functionality, as follows:

A Form component provides you the ability to collect user data. The UI components are grouped into categories, based on their functionality, as follows:

* Basic
* Advanced
* Layout
* Data.

## Basic Components

## Text Field

You can use the **Text Field** component to input short text.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-180756-9adb925e.webp)

## Text Area

You can use the **Text Area** component to input long text. The **Text Area** component offers multi-line input.

The **Rows** setting allows you to set how many rows are visible in the **Text Area** component.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-179556-c212f3a0.webp)

## Number

You can use the **Number** component to input any number value.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-179780-8e19ad25.webp)

* **Use Thousands Separator** - separates thousands with a comma.
* **Require Decimal** - always shows decimals, even if 0.
* **Decimal Places** - sets the maximum number of decimals displaying.

## Password

You can use the **Password** component to input passwords. The text is displayed as asterisks instead of the actual value entered for secrecy.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-180732-11ba9142.webp)

## Checkbox

You can use the **Checkbox** component to input boolean values (true or false).

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-178592-cf4b7e1e.webp)

## Select Boxes

You can use the **Select Boxes** component to allow users to choose multiple values from a list.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-180804-5fa31227.webp)

**Values** - allows you to add options to your Select Box component. The **Label** column is the value visible to users. The **Value** column is the name stored in the data.

## Label/Header

## File/Folder Path

You can use the **Label/Header** component to add labels to other form components. You can also use it to separate sections in your form.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-179272-85d39952.webp)

* **Label Size** - choose a size or type for the **Label/Header** component from the dropdown list.

You can use the **File/Folder Path** component to get the file or folder path of a user's document.

To provide a file path in the **Form Renderer**:

1. Click the **Select** button of the **File/Folder path** component. The **File Control** window opens.
2. Select a file.
3. Click **Open** in the **File Control** window.

To provide a folder path in the **Form Renderer**:

1. Click the **Select** button of the **File/Folder path** component. The **Browse For Folder** window opens.
2. Select a folder.
3. Click **OK** in the **Browse For Folder** window.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-180108-42702e81.webp)

* **Selection Type** - choose the type of path users can select: File or Folder.
* **Show All Files** - when checked, users can select any file type from the **File Control**. When left unchecked, the **Add Extensions** section is displayed, where you have to manually choose what type of files the users can select in the **File Control**.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-179336-2759aec1.webp)

:::note
You can either limit or expand the file types the user can select in the **Add Extensions** section of the **Display** tab.
:::

## Drop-down List

You can use the **Drop-down List** component to display lists in a dropdown format.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-187510-ae2d0f59.webp)

* **Widget Type** - select the type of widget you want to use.
* **Data Source Values** - input the values that appear in the dropdown list. The **Label** column is the value visible to users. The **Value** column is the name stored in the data.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-185314-792eda20.webp)
* **Item Template** - HTML template that allows you to control the way values are displayed in the dropdown list. You can access the values in the dropdown list, through the `item` variable. For example, use `item.label` to access a certain value in the dropdown list
* **Refresh Options On** - refreshes data when another field changes.
* **Refresh Options On Blur** - refreshes data when another field is blurred.
* **Clear Value on Refresh Options** - clears the components value when the **Refresh On Field** option is changed.
* **Read Only Value** - only show the value when in Read-Only mode.
* **Choice.js options** - input raw JSON object to use as options for the **Select** component.
* **Use exact search** - disables search algorithm threshold.
* **Custom Default Value** - create a custom default value using JavaScript or JSONLogic.

## Radio

You can use the **Radio** component to allow users to choose only one value from a list.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-178796-8675cc55.webp)

* **Values** - input the values that appear in the list. The **Label** column is the value visible to users. The **Value** column is the name stored in the database.

## Button

You can use the **Button** component to allow users to perform various actions in the form.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-187066-e3403f2f.webp)

* **Action** - select the action you want the button to perform:
  + **Submit** - submits the form, and runs the **Do** block.
  + **Click** - performs the click operation, and runs the **Do** block.
  + **Reset Form** - resets the form fields.
  + **Event** - when a user clicks the button, a certain event starts running. When selecting **Event** you need to input the event in the **Button Event** field.
* **Reset Data from DO block** - when checked for **Click** type buttons, it sets the data that is received from the **Do** block. Helps increase performance when the data found on other pages is not on the current page.
* **Theme** - choose the color theme of the button from the drop-down list.
* **Size** - choose the size of the button from the drop-down list.
* **Block Button** - stretches to the full width of the bounding container.
* **Left / Right Icon** - add the full icon class string, to show a specific icon. For example, you can add `fa fa-plus`.

## Advanced Components

## HTML Element

You can use the **HTML Element** to display a single HTML element in your form and configure it based on your use-case.

:::note
Enable the **Disable Sanitize** property inside the [Create Form](https://docs.uipath.com/activities/other/latest/workflow/create-form) activity to show all unsafe content inside an **HTML Element**.
:::

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-185470-f40b8eb2.webp)

* **HTML Tag** - The tag of the **HTML Element**.
* **CSS Class** - The CSS Class that can be added for this **HTML Element**. You can input multiple classes, by separating them with single spaces.
* **Attributes** - The attributes for the **HTML Element**. Only safe attributes are allowed, such as: `src`, `href`, and `title`.
* **Content** - the content of the **HTML Element**.
* **Refresh On Change** - re-renders the **HTML Element** whenever a value changes in the form.

To display images and PDF files inside forms, you need to use the **HTML Element** component. Check out the following tutorials:

* [Displaying Images](https://docs.uipath.com/activities/other/latest/workflow/displaying-images).
* [Displaying PDF Files](https://docs.uipath.com/activities/other/latest/workflow/displaying-pdf-files-pre-23-4).

## Content

You can use the **Content** component to add information in your form, that is display-only. The value of the component is not submitted back to the server.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-179076-d9090a76.webp)

* **Refresh On Change** - renders the **Content** component each time a value in the form changes.

## Email

You can use the **Email** component to add a field for inputting email addresses.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-187658-7d97f5a8.webp)

## Phone Number

You can use the **Phone Number** component to add a field for inputting phone numbers.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-179172-9bf3cd19.webp)

* **Input Mask** - Provides a predefined format for the phone number. For the phone number field, the default format is `(999) 999-9999`.
* `9` - numeric
* `a` - alphabetical
* `*` - alphanumeric
* **Input Mask Placeholder Char** - You can use a character as a placeholder in the field.
  :::note
  The placeholder character gets replaced by a space if it is used inside the mask.
  :::

## Date/Time

You can use the **Date/Time** component to input dates, times, or input both.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-179920-78174dde.webp)

* **Format** - the format used for displaying the datetime value.
* **Enable Date Input** - allows users to input dates for this field.
* **Use Input to add moment.js for minDate** - enables the user to use an input for `minDate` moment function, instead of a calendar.
* **Use calendar to set minDate** - enables the user to use a calendar to set the `minDate`.
* **Use Input to add moment.js for maxDate** - enables the user to use an input for `maxDate` moment function, instead of a calendar.
* **Use calendar to set maxDate** - enables the user to use a calendar to set the `maxDate`.
* **Disable specific dates or dates by range** - add dates that you want to ban. For example, `2027-08-11`.
* **Custom Disabled Dates** - allows you to ban certain dates using a customized function.
* **Disable weekends** - allows you to ban weekends.
* **Disable weekdays** - allows you to ban weekdays.
* **Enable Time Input** - allows users to input time for this field.
* **Hour Step Size** - the number of hours that have to be incremented or decremented in the time picker.
* **Minute Step Size** - the number of minutes that have to be incremented or decremented in the time picker.
* **12 Hour Time (AM/PM)** - displays time in 12 hour periods, using AM or PM.
* **Default Date** - sets the default value to a specific date using **Moment.js** functions. For example, you can use the following function: `moment().substract(10, 'days')`.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-179596-75dc5646.webp)

## Day

You can use the **Day** component to ask for input for **Day**, **Month**, and **Year**, either through a number-type field or a select-type field.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-180276-9880024a.webp)

* **Type / Type of input** - choose to give input for Day, Month, or Year either by typing in a number or by selecting options from a dropdown list.

**Minimum / Maximum Year** - choose the minimum / maximum year that can be entered.
* **Require Day** - the Day field must be filled in before the form renders.
* **Require Month** - the Month field must be filled in before the form renders.
* **Require Year** - the Year field must be filled in before the form renders.
* **Maximum / Minimum Day** - choose a minimum / maximum day that can be entered. You can also use **Moment.js** functions. For example, you can use `moment().add(10, 'days')`.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-186946-d46158db.webp)

## Time

You can use the **Time** component to input time in different formats.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-181236-192d995b.webp)

* **Input Type** - select the type of widget you would like to use for inputting time: **HTML5 Time Input** (users can choose the time from a given panel) or **Text Input with Mask** (users can manually input the time).

## Currency

You can use the **Currency** component to display financial amounts using a certain currency. The component has an input mask that displays the currency icon and automatically adds commas based on the number that the user inputs. The component allows two decimal values.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-178452-edb3335d.webp)

* **Currency** - choose a certain currency from the drop-down list.

## Survey

You can use the **Survey** component to allow users to answer multiple questions, by choosing only one value from a list.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-183341-0d024f63.webp)

* **Questions** - add the questions that the users should answer.
* **Values** - add the options that the user can select per question.

## Layout components

## Columns

You can use the **Columns** component to display other components in line, grouping them as columns.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-186974-019cc94a.webp)

* **Column Properties** - add columns to the component and configure them, by adjusting their Width, Offset, Push and Pull properties. After configuring the columns' layout, you can drag and drop other components into the **Columns** component.
* **Auto adjust columns** - automatically adjusts columns, if there are hidden nested components.

## Panel

You can use the **Panel** component to group components and add them inside a named panel.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-178071-39fef52a.webp)

* **Theme** - choose the theme of the panel from the dropdown list. The Bootstrap class is added to the wrapper div.
* **Collapsible** - allows you to collapse the panel.
* **Initially Collapsed** - the property is available only when **Collapsible** is checked. Collapses the panel when the form has loaded.

## Table

You can use the **Table** component to create a table that holds other form components inside the columns and rows of the table.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-180656-744f6ab4.webp)

* **Number of Rows / Columns** - enter the numbers of rows or columns that you want to be displayed in the table.
* **Clone Row Components** - clones the components inside rows and adds them in the remaining rows, too. You can use it when creating tables with multiple rows, that contain the same content.
* **Cell Alignment**- choose the horizontal alignment of the cells in the table.
* **Striped** - adds striped shading to rows.
* **Bordered** - adds visible borders to the table.
* **Hover** - highlights row when hovering the mouse over it.
* **Condensed** - condenses the size of the table.

## Tabs

You can use the **Tabs** component to group components into tabs. When the form renders, you can view one tab at a time.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-178980-ce2efc87.webp)

The **Tabs** setting allows you to add, configure, reorder, and remove tabs.

## Data

## Hidden

You can use the **Hidden** component to create a resource property that can be custom set inside a form. It doesn't display in rendered forms.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-180088-7321da00.webp)

## Container

You can use the **Container** component to wrap a set of fields into an object with a container key. A **Container** with the key `financialPerformance` submits as:

```
{
    data: {
      financialPerformance {
        grossProfitMargin: "0.83",
      netProfitMargin: "0.43"
      }
   }
}
```

![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-180796-ff8e17a9.webp)

## Data Grid

You can use the **Data Grid** component to render multiple rows of data, similar to a data table. You can drag and drop multiple components in the **Data Grid** to match your use case.

![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-186898-b4bf1c5c.webp)

In the **Form Renderer** window, the rows inside the **Data Grid** component can be added or removed.

![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-179440-c82317d6.webp)

* **Disable Adding / Removing Rows** - hides the buttons that allow adding or removing rows when the form renders.
* **Allow Reorder** - reorder rows by dragging and dropping them.
* **Equal Column Width** - makes the widths of columns equal.
* **Enable Row Groups** - allows separating rows into groups. Add groups, label them, and select the rows for each group.
* **Initialize Empty** - the **Data Grid** will have no visible rows when initialized.

## Edit Grid

You can use the **Edit Grid** component to render multiple rows of data, similar to a data table. You can drag and drop multiple form components into the **Edit Grid**, to capture loads of data.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-180484-d37c8e41.webp)

When the form renders, you can add a duplicate of the **Edit Grid**, by clicking **Add Another**.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-186466-a65b766c.webp)

* **Open First Row when Empty** - opens the first row when the **Edit Grid** is empty.
* **Disable Adding / Removing Rows** - hides the buttons that allow adding or removing rows when the form renders.
* **Add Another Text** - changes the name of the **Add Another** button.
* **Save Row Text** - changes the text of the **Save Row** button.
* **Remove Row Text** - changes the text of the **Remove Row** button.

The **Templates** tab is specific to the **Edit Grid** component only. The **Header**, **Row**, and **Footer** Templates allow you to customize the grid using JavaScript. You can modify what type of components display in the rows within a grid or the look of the header / footer.

**Header Template**

This is the Lodash Template used to render the header of the **Edit Grid** component.

:::important
The **Header Template** doesn't work with [Form Actions](https://docs.uipath.com/activities/other/latest/workflow/create-form-task).
:::

There are two variables available:

* **value** - the array of row data.
* **components** - the array of components in the grid.

**Row Template**

This is the Lodash Template used to render each row of the **Edit Grid** component.

:::important
The **Row Template** doesn't work with [Form Actions](https://docs.uipath.com/activities/other/latest/workflow/create-form-task).
:::

There are three variables available:

* **row** - object of one row's data.
* **components** - the array of components in the grid.
* **state** - current row's state (draft/saved).

To add **Click** type events, add the following classes to elements: `editRow` and `removeRow`.

**Footer Template**

This is the Lodash Template used to render the footer of the **Edit Grid** component.

There are two variables available:

* **value** - the array of row data.
* **components** - the array of components in the grid.

## Grid

You can use the **Grid** component to render multiple rows of data, similar to a data table. **Grid** is a read-only component that you can use to display large amounts of data. You can drag and drop multiple form components into the **Grid** component.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-185330-a60c9b0a.webp)

* **Sortable** - sort data inside columns in ascending or descending order. You sort the data at runtime, in **Form Renderer**.
* **Filterable** - filter data inside each column. Filter the data at runtime, in **Form Renderer**.
* **Column(s) Resizable** - change the width of the columns at runtime, in **Form Renderer**. The Column(s) Resizable capability allows you to see the data inside columns better.
* **Pagination** - display the data of the **Grid (Preview)** component on pages that are numbered. The pagination capability also includes setting the number of items per page.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-178396-15b5843c.webp)

To learn more about how to use the **Grid** component, see [Using the Grid](https://docs.uipath.com/activities/other/latest/workflow/using-the-grid-component).

## Comparison between grid control components

The table below compares the capabilities of the grid controls available in the Form Designer. The table also describes the recommended scenarios for using each grid control component: **Grid**, **Data Grid**, and **Edit Grid**.

**Legend**: ✅ = Not available.

| Capability | Grid | Data Grid | Edit Grid |
| --- | --- | --- | --- |
| **Recommended scenarios** | Displaying large number of data for read-only purposes (read-only capability). | Displaying a small set of data that needs to be edited by the user (inline edit capability). | Displaying a small set of data that needs to be edited by the user (sub-form inline edit capability). |
| **Recommended number of rows** | Unlimited (100 rows pagination support). | Not more than 100 rows. Risk of performance reduction beyond recommended numbers. | Not more than 100 rows. Risk of performance reduction beyond recommended numbers. |
| **Recommended number of columns** | Unlimited. | Maximum 7 columns for 100 rows. Risk of performance reduction | Maximum 7 columns for 100 rows. Risk of performance reduction. |
| **Editable** | ❌ | ✅ | ✅ |
| **Pagination** | ✅ | ❌ | ❌ |
| **Sortable** | ✅ | ❌ | ❌ |
| **Filterable** | ✅ | ❌ | ❌ |
| **Column resizable at runtime** | ✅ | ❌ | ❌ |
| **Row grouping** | ❌ | ✅ | ❌ |
| **Logic & Conditions** | ❌ | ✅ | ✅ |
| **Extensive customization using templates** | ❌ | ❌ | ✅ |
| **Global search** | ❌ | ❌ | ❌ |
