The field is the structure that contains the relation between the inputted data and the Device data in some widgets.
Fields can have a bunch of types, depending on the widget that it is dealing with.
A typical text input will appear, and the value will be anything that was typed into it.
It will display a text field integrated with Google Maps to look for an address, and the values for this field will be the complete address selected and it will also have the location coordinates within it.
For the Input Form Widget, it is possible to enable a map under the input.
It will display a calendar field that allows the user to enter a date, or a date range, as a value through a calendar popup. When receiving the user answer in your device, you will be able to get it in the value parameter and the metadata parameter. The latter one will be in date string format as start_date
and end_date
.
For example, the input above will produce the following payload:
{ "variable": "location", "value": "Start: 2021-06-04T03:00:00Z, End: 2021-06-11-T02:59:59Z", "metadata": { "end_date": "2021-06-11T02:59:59Z", "start_date": "2021-06-04T03:00:00Z" } }
A traditional checkbox will appear and the value will be set as true (checked) or false (not checked)
It will display a step button to select the hour range without the date.
It will display a dropdown field with all an account's devices. The value of the field will be the id of the selected device.
It displays a dropdown menu with options that you define. The value of the field will be the selected options, and these options can be defined as static or dynamic with the dropdown being filled up with data coming from a variable. Learn more about Creating Dynamic Dropdown selection using Forms.
It displays a dropdown menu with options that you define. The value of the field will be the multiple options selected, and these options can be defined as static or dynamic with the dropdown being filled up with data coming from a variable.
It displays a field to submit multiple emails, separated by a comma.
It will display an option to upload files to TagoIO. These files will be stored in the files section under the folder devices/your_device_id/
by default. It is possible to restrict the number of files per upload, allow users to use their mobile camera, and more.
You can customize the path, however. For example, if you want to save the files in a folder called
images
and a subfolder calledicons
, you would need to typedevices/your_device_id/images/icons
The variable that receives this data keeps the file name in the value parameter, and in the metadata it keeps the file's parameter. So sending a file will produce variable data like this:
{ "variable": "file_variable", "value": "file_name.png", "metadata": { "file": { "md5": "md5_data", "path": "devices/your_device_id/file_name.png", "url": "your_file_url" } } }
It will display a dropdown field, with options that change dynamically based on other fields. In the example below, the Food field changes based on the Food Type field. Learn more about Filtered Variables
Whenever you need to choose a value by using images instead of entering text, the image Field is the best option in form widgets. By entering media URLs into the options, the field will be filled with these images or videos and you will be able to select one or many of them. Learn more about Adding Image Selector field on Forms.
It will display a step button to select a numerical value.
A traditional Radio input will appear. Once selected, you will be able to define its options with their labels and values. The value of the field will be one of the selected options.
This field is the only one that doesn’t represent a value to be sent with the form. The variable set to this field type expects to receive data (text) to show as a message above the form. Besides the text, you can also define the type of message that will appear. There are four types: warning, info, danger, and success. You can do this by sending a property type
in the metadata object of your data.