Templates, fields and components
Components fall into four categories.
Used simply to add a visual element to the template.
These components capture some information, and upload to it – in turn, this information is sent to Zapier or another recipient.
Computed components calculate a value based on other information in the template, such as capture-* or other computed-* components.
Sections are used to group fields together, either for convenience or so that they can be manipulated as a group. They may be repeating or non-repeating. Repeating sections allow the group to repeat.
For details, see the Template Components list.
Depending on the component used for a field, that field will have a specific set of parameters that define it, and will provide specific pieces of information.
You will see the parameters in the Builder when you tap on the field.
You can also see them in the Builder’s JSON view.
{ "type": "capture-signature", "label": "Customer Signature", "id": "customerSignature" }
Most fields have a “label” property, simply a piece of text displayed adjacent to the field.
Use this to describe the item. Keep it short – users are unlikely to read long paragraphs here, especially on a small screen.
Many fields have an “id” property, used to identify that field and access its data.
Often, there is a “default” value for a field, which can be pre-filled in the Template to avoid entering it every time.
Code can appear in computed-* components to perform calculations, or in some other circumstances such as the section-optional component as the logic for when the section should appear.
They are essentially JavaScript expressions, which will be executed as if in the context:
function myCode() { return expression; }
Some special syntax is required when you want to use data from another field in the Template.
#fieldId
##fieldId
#sectionId.length
#sectionId[n].#fieldId
Display total cost based on “hours” (capture-numeric) and “costPerHour” (capture-money).
Note: the value of a capture-money is 100 times the value displayed, so we need to divide by 100.
For example, if hours = 247 and costPerHour = 2560 (displays as “25.60”):
Copyright © 2018 mobilit.ee OÜ