Skip to content

Form Components API Guide

The form can have different components arranged in different layouts. Each control or component can be configured separately and customized.

  • Adding Form Component: Drag and drop the component you need anywhere in the form. If you need to add it to a column or other layout, drop it within that component
  • Editing Form Component: Hover over the component to display a set of options on the right. Without moving the mouse cursor away from the component, click on the gear icon to edit its properties
  • Deleting Form Component: Hover over the component to display a set of options on the right. Without moving the mouse cursor away from the component, click on the delete icon to remove it from the form

Note: The below properties are available for most components

PropertyDescription
LabelEnter the label that you want displayed for this component in the form
Label PositionSelect the desired label alignment
PlaceholderEnter the placeholder text to be displayed
DescriptionThis is additional help text that can be provided and will always be displayed below the component
TooltipThe tooltip text will be displayed when a user hovers over the :fa-question-circle: icon next to the label
Custom CSS classIf you need to customize the control, you can add the class name here. The CSS needs to be added in the CSS Settings
HiddenThe component will be hidden and will not be displayed in the form (it will be visible in the designer). Hidden form fields can be used to hold any form data for processing via JavaScript etc
Hide LabelHides the label
Initial FocusSets focus to this component when form is opened
DisabledForm field will be displayed but cannot be edited
Table View :fa-window-close:System Field, configuration not required and will be ignored
Modal EditSelect this if the component should be displayed in a popup for edit. When the user taps on the component they can edit. This is useful for components like Signatures wherein the full mobile screen can be available to sign in a popup panel for example
PropertyDescription
RequiredMake the field a required field, form cannot be submitted when empty
UniqueValid only for Master Data Indicates a key field
Validate OnSelect when the validation be done for this field
Error LabelError label to display when this field validation results in an error
Custom Error MessageSet to a custom error message if required to display
Custom ValidationIf the standard validation is insufficient and more complex rules are required, JavaScript code can be added for validating this field
JSONLogic ValidationExecute custom logic using JSONLogic
PropertyDescription
Property NameUnique name (in the current form) to identify this field/component
Field TagsAdd any tag for the field, this can be used to identify the field(s) in custom logic
Custom PropertiesAny additional properties can be configured as key-value pairs, typically not requried

Any form component can use conditional logic to hide or display it. The component can show or hide iteself based on another component that is part of the form. The condition logic can be based on text values of other components also.

PropertyDescription
DisplaySet to True to show or False to hide
When the form componentChoose the form component that this component depends on
Has the valueSet the value to check for

When additional conditions need to be checked and the Simple Logic is insufficient, you can enter JavaScript code in the Advanced Conditions field to control the visibility of the component. Visibility is controlled by setting the variable show to true or false via your computations.

You can also choose to use JSONLogic to execute your rules modelled in JSON

Any form component can use more flexible and powerful logic to control any property, value or even change multiple properties by working with the component’s schema direclty.

Logic is defined via a Trigger that can run Actions. Each trigger can run one or more actions to control multiple facets of the component itself.

PropertyDescription
Logic NameProvide a friendly name to identify the logic’s purpose
Trigger TypeChoose the trigger type from Simple, JavaScript, JSONLogic or an Event that is raised by a Button or other components
Trigger Type: SimpleChoose the other component and the value it should have
Trigger Type: JavaScriptCode a JavaScript snippet to control the trigger
Trigger Type: JSONLogicExecute custom logic using JSONLogic
Trigger Type: EventName of the event (from a button for e.g.) that will act as the trigger
Action NameProvide a friendly name to identify the action
Action TypeChoose the action type from Property, Value or merging component schema
Action Type: PropertyChoose the property that needs to be changed and choose the value to set it to
Action Type: ValueCode a JavaScript snippet to compute the value
Action Type: Merge SchemaAdvanced. You can make changes to multiple properties here via JSON definition

Remember to save the Action(s) and Logic


Use a Textarea component to accept single line text input

PropertyDescription
PrefixEnter the text to show before a field such as currency sign like $. This can also be used to show a font-awesome icon in the control
SuffixEnter the text to show after a field. This can also be used to show a font-awesome icon in the control
Input MaskAn input mask provides a predefined format for data entry. Use 9: numeric, a: alphabetical and *: alphanumeric
Multiple ValuesAllows to enter multiple values for this textfield
Default ValueDefault value for the textfield
Show Character CounterDisplays the character count, useful to limit to a fixed number of characters
Allow SpellcheckEnable spell checker
Show Word CounterDisplays the word count, useful to limit to a fixed number of words
Persistent :fa-window-close:System Field, configuration not required and will be ignored
Input FormatSanitize the input to plain text, HTML or raw data
Protected :fa-window-close:System Field, configuration not required and will be ignored
Database Index :fa-window-close:System Field, configuration not required and will be ignored
Text CaseControl what case the text is entered in
Encrypted :fa-window-close:System Field, configuration not required and will be ignored
Redraw OnChoose the component that controls the redraw of this component
Clear Value When HiddenWhen a value is hidden, clear it
Custom Default ValueCode a JavaScript snippet to compute the value
Calculated ValueCode a JavaScript snippet to compute the value
Calculate on Server :fa-window-close:System Field, configuration not required and will be ignored
Allow Manual Override of Calculated ValueAllow user to change the calculated value
Showing a Font Awesome Question icon as a prefix/suffix
<i class='fa fa-question'></i>

Use a Textarea component to accept multi line text input

PropertyDescription
PrefixEnter the text to show before a field such as currency sign like $. This can also be used to show a font-awesome icon in the control
SuffixEnter the text to show after a field. This can also be used to show a font-awesome icon in the control
Multiple ValuesAllows to enter multiple values for this textarea
Default ValueDefault value for the textarea
Show Character CounterDisplays the character count, useful to limit to a fixed number of characters
Allow SpellcheckEnable spell checker
Show Word CounterDisplays the word count, useful to limit to a fixed number of words
RowsNumber of rows to display
EditorType of editor to use for the textarea
Auto expandTextarea expands automatically as the user types
Persistent :fa-window-close:System Field, configuration not required and will be ignored
Input FormatSanitize the input to plain text, HTML or raw data
Protected :fa-window-close:System Field, configuration not required and will be ignored
Database Index :fa-window-close:System Field, configuration not required and will be ignored
Text CaseControl what case the text is entered in
Encrypted :fa-window-close:System Field, configuration not required and will be ignored
Redraw OnChoose the component that controls the redraw of this component
Clear Value When HiddenWhen a value is hidden, clear it
Custom Default ValueCode a JavaScript snippet to compute the value
Calculated ValueCode a JavaScript snippet to compute the value
Calculate on Server :fa-window-close:System Field, configuration not required and will be ignored
Allow Manual Override of Calculated ValueAllow user to change the calculated value

Use a Number component to accept numeric input

The properties are similar to those configured for a Textfield

PropertyDescription
Minimum ValueMinimum value to accept
Maximum ValueMaximum value to accept

Use a password component to accept secret inputs. While they are not diaplyed in the UI they are submitted as clear text to the server. Make sure server runs only in https mode to ensure data is secure during transit

The properties are similar to those configured for a Textfield


Use a checbox input to accept True/False values or Radio inputs to accept one of many values

PropertyDescription
Label WidthWidth of the label in %
Label MarginMargin of the label in %
Input TypeCheckbox or Radio
Input Type: RadioSpecify Key / value for label and value
Inline layoutControls the display of the control and the text

Use a select box input to accept multiple True/False values

PropertyDescription
ValuesAdd key/value pairs for each select box

Use a select (or dropdown list) to allow user to select one or more inputs from a prefilled list

PropertyDescription
DataSelect the type of data to display in the list
Data: ValuesEnter key/va;ue pairs to display in the select list
Data: URLThis will work only when online. Enter a URl that returns data in the required format
Data: Master dataCheck the Master Data help doc
Data: CustomCode JavaScript logic to compute the values
Data: Raw JsonEnter JSON data directly to be displayed in the list
Enable Static SearchAllow user to search entries
Search thresholdHow exact the search needs to be. 0 for exact match and 1 for a loose match
Use exact searchDisabled Search threshold
ChoiceJS optionsThe ChoiceJS component is used for displaying the list. Additional options from ChoiceJS can be configured here

Use a radio input to accept one of many values

The properties are similar to those configured for a Checkbox where Input Type is set to Radio


Add a button to perform a certain action when the user clicks on it

PropertyDescription
ActionChoose from Submit, Smart Data Component, Event, Custom or Reset (other options are for future use)
Action: SubmitDo not set to this. The form already has a Submit action button added automatically by the designer
Action: Smart Data ComponentCheck the Smart Data Component docs
Action: EventRaise a custom event for other logic to run
Action: CustomCode a JavaScript snippet to execute on button click
Action: ResetResets the form
ThemeType of button to display
Left IconEnter the Font Awesome icon to display on the left side such as fa-question
Right IconEnter the Font Awesome icon to display on the right side such as fa-question
Disable on form invalidDisables the button when there are any validation errors in the form. Missing required fields is a good example of a validation error

Use an Eamil component to accept a format validated email

The properties are similar to those configured for a Textfield


Use a URL component to accept a format validated URL

The properties are similar to those configured for a Textfield


Use a Phone number component to accept a format validated phone number

The properties are similar to those configured for a Textfield


Use a Tags component to accept multiple tags in the form

The properties are similar to those configured for a Textfield

PropertyDescription
DelimiterChoose the delimiter between tags

Use an Address component to accept an address and validate it

The properties are similar to those configured for a Textfield

The Provider tab allows you to configure the provider for validation


Use a Datetime component to accept a Date and Time from the user

The properties are similar to those configured for a Textfield

PropertyDescription
Display in timezoneChoose from viewer, UTC etc
Use LocaleUse locale settings to display date and time
Allow Manual InputAllow user to enter date/time manually
FormatDate/Time format

In addition the Date and Time tabs control the date and time configuration individually


Use a Day component to accept a day/month/year in the form

The properties are similar to those configured for a Datetime

In addition the Day, Month and Year tabs control the configuration individually


Use a Time component to accept a time in the form

The properties are similar to those configured for a Datetime


Use a Curreny component to accept a currency value in the form

The properties are similar to those configured for a Number


Use a Survey component to include a Survey of questions in the form

PropertyDescription
QuestionsAdd the question text and the value to submit
ValuesAdd as many responses as needed for each question. For e.g. in a custmer satisfaction survey it could Be Excellent, Satisfactory, Needs Improvement

Use a Signature component to enable users to add a digital signature to the form. Users can either draw their signature on mobile (with a mouse on desktop) or simply Click to Sign their name. Signatures are embedded directly into the form and rendered as is in PDFs and also while printing.

PropertyDescription
WidthWidth of the signing panel in pixels or %
HeightHeight of the signing panel in pixels or %
Background ColorBackground color (rgb or short codes like black) of the signing panel
Pen ColorPen color (rgb or short codes like black) for the signing panel

HTML elements allow to add HTML snippets directly to the form. You can include any valid HTML

PropertyDescription
HTML TagThe tag for this HTML element, default

CSS ClassOptional Bootstrap class
AttributesAdd Attribute/Value pairs that are valid for the chosen HTML Tag
ContentThe actual HTML content to include
Custom CSS ClassCustom CSS class if any. Custom CSS needs to be added in the CSS Settings

Content allows to add any text to the form. This could be notes for the user or any help text etc. This data is not submitted to the server when the form is completed. Enter the data to be displayed in the editor and format as required.

No additional configuration required.


Add a columns layout to the form to design a responsive form. The maximum width is 12 and you can add as many columns as needed to make up that total. For e.g. 2 columns of 6 width or 3 columns of 4 width etc. Also columns help to design responsive elements in the form. For e.g. on a mobile form the screen would adjust to 1 column width automatically to show all elements vertically.

PropertyDescription
Column PropertiesNumber of columns
Auto adjust columnsAdjust based on content
Hide column when children hiddenHides the column if the child components within are hidden. Useful to hide an entire column and save space on screen

A fieldset can be used to create a title area as part of the form. This can be placed inside other Layout components or in between lots of data fields. Other components can be added into this layout. The data from the fieldset is directly submitted as part of the form and not under a separate key.

PropertyDescription
LegendThe Legend appears prominently at the top of the Fieldset layout

Panels can be used to create collapsible sections as part of the form. Other components can be added into the panel layout.

PropertyDescription
CollapseAllow panel to be collapsed or not
Initially CollapsedPanel displays collapsed when form opens

A table can be used to create a tabular section as part of the form. Other components can be added into the cells of the table. For web view this is suitable but Tables are not responsive and its recommended instead to use a Column layout

PropertyDescription
RowsNumber of rows
ColumnsNumber of columns
Clone Row ComponentsIf checked, the components from the first row are copied to all the other rows
Cell AlignmentChoose the desired alignment
StripedTable styling with stripes
BorderedTable styling with border
HoverHighlight a row on hover
CondensedCondensed table

Tabs layout can be used to create a set of Tabs as part of the form. Other components can be added into the individual tabs. Use tabs when a lot of data has to be entered and the form should not have a “busy” view.

PropertyDescription
TabsAdd the Tab name and the key

A Well is a Bootstrap well that can be added to the form for a simple layout container. Add components into the well to group them together.

No additional configuration required.


A Hidden component is not displayed. It can be used to compute a value using JavaScript and the computed value will be submitted to the server. The value will not be displayed in the client.

No additional configuration required.


A Container is similar to a Fieldset that can be added to the form for a simple layout container. Add components into the well to group them together. The only difference is that the submitted data is grouped under the Container API key.

No additional configuration required.


Data Map allows to collect a variable number of key / value pairs of data

PropertyDescription
Label for Key columnLabel to display
Disable Adding/Removing rowsIf set, the Add and Delete button are hidden. Useful to collect a fixed number of rows of data
Show Key Column before valueDisplays key column and then value column

Data Grids allow users to add multiple components on to a line item grid. Add multiple components as required inside of the Data Grid. Datagrids have the flexibility to collect a variable number of rows while filling in data and is best suited for data sets like order items, inspection observations etc.

Any number of grids can be added within a form which is especially useful when needing the ability to add or duplicate multiple fields sets.

PropertyDescription
Disable Adding/Removing rowsIf set, the Add and Delete button are hidden. Useful to collect a fixed number of rows of data
Allow ReorderMove rows up and down to change their order
Conditional Add ButtonDetermine with JavaScript when the Add button is displayed
Add Another TextText to display to add another
Add Another PositionChoose where to display the button
Default Open RowDisplays open rows
Equal Column WidthEqual column width
Enable Row GroupsChoose if rows need to be grouped together
Initialize EmptyStart empty
Minimum LengthMinimum number of rows
Maximum LengthMaximum number of rows

Edit Grids allow users to add multiple components on to a line item grid. Add multiple components as required inside of the Edit Grid. Editgrids have the flexibility to collect a variable number of rows while filling in data. The grid as such displays data read only and provides an edit icon to edit all the data.

PropertyDescription
Disable Adding/Removing rowsIf set, the Add and Delete button are hidden. Useful to collect a fixed number of rows of data
Open First row when EmptyOpen row when empty
TemplatesHeader and Row templates can be customized and defined based on the example
Add Another TextText to display to add another

Similar to other grid layouts which hold other controls


SmartID can be used in a form to generate a unique ID for each form when it is created. The template for the ID can be configured flexibly. Counter should mandatorily be part of the ID template.

PropertyDescription
PatternCreate custom numbers by specifying a pattern. Available variables: ${counter} - Number, ${day} - 01 to 31, ${month} - 01 to 12, ${year} - 2021. For example, ${year} - ${counter} would be converted to 2021-00001 if zero prefix is true
Start CounterThe number to start generating from

Many Forms like Inventory count etc. require Barcode scanning functionality. Any Barcode can be scanned and the scanned text copied to a text field.

The properties are similar to those configured for a Textfield

PropertyDescription
Update Value to Scanned BarcodeSet the barcode text scanned to the textfield
Trigger Smart Data ComponentRaises an event to the selected Smart Data Component so that the SDC can download the requried data. Check the Smart Data Component docs

Barcode scanning functionality can also be attached to a Select (dropdown) field. Use a Select Barcode component to enable scanning in a select choice (dropdown) list. The scanned text is used to automatically select the correct item in the list. This is useful when scanning equipment for e.g. and selecting associated details automatically.

The properties are similar to those configured for a Select


Use a Smart Data Component (also referred to as SDC) when data needs to be fetched online from a . This allows you to online fetch data from backend systems using Flows and updating the form.

PropertyDescription
Before ExecuteSection determines actions to take before SDC is executed. This can be used to initialize or perform some computations before the execution
ExecuteSection determines action that triggers the SDC to execute
Trigger on Form LoadRun the flow when the form is initialized when opened (run once)
Trigger On Component ActionTriggered by another form component such as Barcode Select and Button Event
Trigger on Data ChangeTrigger when the data in the selected component changes
After ExecuteSection determines actions to take after SDC is run and data fetched. This can be used to chain flows in the form and update other fields or initiate other SDC after this has run
Fire EventName of event that must be fired after the SDC has run
JavaScriptCustom JavaScript code snippet that needs to be executed after the SDC has run
Datasource TypeSelect from Flow or URL and provide additional details
- Create form without the SDC but add all the other remaining fields
- Create the SDC Flow using the form
- Return to the design view of the form
- Add a new SDC component
- Associate the newly created Flow to the SDC

Use a Smart Table component to show data in a responsive tabular form. Also displays nested data. Typical use cases include running an SDC and populating data in the Smart Table based on user input like get list of Approvals to approve etc.

Note: The powerful Tabulator control is used for this purpose. For additional information check the Tabulator docs.

PropertyDescription
Columns Layout ModeChoose the display mode for columns
Responsive Columns LayoutChoose the desired layout
Column GroupingIf columns are grouped, the required alignment
Frozen ColumnsFreeze the first column from scrolling
Filter HeaderAllow filtering each column
Movable RowsAllow moving rows to change order
MultiselectAllow multiselect of table rows
Add action button to each rowAdds an icon button to click and perform any action
Column Selection MenuAllows to show or hide columns
ColumnsConfigure the columns to display
Column HeaderLabel to display, value identifies data field to display, Allow edit or not.
Set Item HeadersAdd this configuration if you have a nested item table to display

Use a File component to attach files, pictures from camera etc to the form.

PropertyDescription
StorageChoose Smart Storage for the most optimized storage, or BASE64
Display as ImagesThumbnails will be displayed
Upload onlyUse to only upload files
Enable Web CameraEnable capturing images via camera
Change Default CompressionAchieve better transmission speeds and optimizations by enabling this and setting the desired compression size and maximum Height or Width. The compressor will choose the most appropriate settings between them to performa lossless compression
File TypesAdd the list of file types that can be attached
File Minimum SizeFile Minimum Size
File Maximum SizeFile Maximum Size

Use to nest another form within this form. This allows to reuse Nested Forms across forms and also to propagate changes to nested forms to all forms by maintaining once.

PropertyDescription
FormChoose the nested form
Form VersionThe current nested form version and comment is displayed
Form UpdateThe new nested form version and comment if any is displayed and allows to update

Note: The builder embedded is based on some additional opensource components (Apache licensed) from formio and other OSS repos. These have been enhanced and customized by Unvired for Enterprise usage within the Turbo Apps and Forms products.