Smart Fields

Smart fields use a special tag that starts with "$". They cannot be provided by a user in the form. Those fields are build or calculated based on existing nonsmart regular fields.

Smart Fields to calculate values

Labor: {labor} USD
Parts: {parts} USD
Total: {$ labor + parts} USD
Total + Tax: {$ (labor + parts) * 1.22}

You can use smart field to do simple and advanced calculations based on provided user form input.

Make sure that you pick “NumberField” in form customization to prevent users from using text instead of numbers for fields that you want use for your calculations.

Smart Fields Numbers vs Strings

If you want to accept strings and convert them into numbers for further calculations (useful if you integrate with the external system) you can use the special syntax within smart fields like : +[fieldname]. Example:

Use Special Filters to modify results

Smart Fields for conditions

You can use conditions to output element based on value provided from different field (from user)

General Condition Schema:

Examples:

Supported operators:

Example #1

Example #2

Special Smart Fields

Show Current Time & Current Date with Format & Timezone

You can display current time or date using special smart field.

It supports two optional parameters:

{$currentDate | date:'[format]':'[timezone]':'[style]'}

{$currentTime | date:'[format]':'[timezone]'}

format [optional] - output format using language code - Examples: en-US, en-GB, fr-FR, de-DE, pl-PL, es-ES, it-IT | Default: 'en-US'

timezone [optional] - timezone in IANA format - Examples: America/Chicago, Europe/Berlin, Europe/Warsaw, Europe/Rome | Default: 'UTC' UTC Timezone See list of Available Timezones:

https://en.wikipedia.org/wiki/List_of_tz_database_time_zonesarrow-up-right

style [optional] - date display style | Default: Auto selected - depends on "format"

If incorrect format / timezone will be provided Documentero will use default values.

Last updated