Skip to content

Capture As

Capture as configures the Tracker form for collecting data used to create the dispatch.

{
    ..
    "$capture": {
        "as": "<control>",
        .. attributes ..
    },
    "default": .. optional default value to set ..    
    ..  
}

JSON Schema property standard attributes

{
    "title": "<title>",
    "description": "<optional description>",
    "type": "string"|"number"|"array"|"object",
    "minimum": 0,
    "maximum": 10,
    "enum":["apple", "orange"],
    "default": "apple"
}

All fields support rule.

Target Description Documentation
check-list Checkbox list See CheckList

Autocomplete

Autocomplete type ahead control

autocomplete

  • default
  • enum: Actual choices
  • $capture.sort: true | false
  • $capture.transform: capitalize | upper | de-kebab

Block

Text block

block

  • default: default value
  • $capture.rows: number of rows
  • $capture.autosize: true|false autosize the control

Boolean toggle switch

Shows a toggle switch to set true or false.

boolean

  • default
  • $capture.input: check | toggle

Check

A check box that sets true or fauls for the value.

check

  • default: default value

Clock range

Allow the user to select a start / end time range within the current day. The range is a decimal value where 13.5 means 1:30pm separated by a dash.

clock-range

  • $suggested: Suggested clock range; shown but not set
  • $capture.readonly: Do not allow editing
  • $capture.confirm: Adds a checkbox to confirm the value
  • default: default

Clock range

Allow the user to select a time within the current day. The result is a decimal value where 13.5 means 1:30pm.

clock-single

  • $suggested: Suggested clock value; shown but not set
  • $capture.readonly: Do not allow editing
  • $capture.confirm: Adds a checkbox to confirm the value
  • default: default

Convert

A metric / imperial entry control that supports various units.

convert

  • unit: mass | length
  • singleEntry: true | false; applies to length, if true then only inches if false feet and inches.

Droplet

Displays a series of controls based on the droplet.

droplet

  • default
  • $capture.as: "droplet"
  • $capture.form: the $capture configuration to use for rendering each droplet entry
  • $connect: the handle of the droplet

Displays a dropdown control with the choices configured.

dropdown

  • default
  • $data key/value pairs
  • enum flat list of values
  • $display.as: "text" | "capitalize"

Dynamic

BETA A field that allows the user to add additional properties on the fly. It assumes some structure to the created attributes and new attributes will get suffixed with a dash and number "-22".

dynamic

  • $capture.match: Regex to find all the related properties
  • $capture.field: Prefix mask regex; newly added attributes will get this prefix
  • $capture.schema: A schema for the new property that uses the Popup metric. Must include $data.
    • attribute:
    • value:

Horizontal rule

Adds a horizontal line.

horizontal-rule

None

Icon

Icon options for the user to select from.

icon-multi

  • $capture.orient: tiles | list
  • $capture.list: map where the key matches a value list option and the result is an object
    • title: display
    • icon: icon
    • color: color hex value
  • enum: value list

Location

Allows the user to type and retrieve a geo location using a geo code API to obtain the result.

location

  • $capture.searchOptions: address | establishment | (regions) | (cities)

Measure

Text field that includes a configurable unit that appears at the right end of the control.

measure

  • $capture.base: Unit

Number

Similar to text field but allows only numeric input

number

  • default
  • $capture.label: Add a label into the field; goes at the start

Displays a popup with multiple options; good for longer complex lists of choices for the user.

popup

  • $data.source: an array of data objects
    • value: value to set
    • display: what to show to the user
    • icon: icon (optional)
    • color: color hex value (optional)

Quote

A static control that displays the value as a styled quote block. It assumes the value has already been set and will not be set by the user.

quote

None

Radio

Displays a list of radio controls.

radio

  • default
  • $data key/value pairs
  • enum flat list of values
  • $capture.config.sort: true | false
  • $capture.config.transform: "capitalize" | "upper" | "de-kebab"

Range

Numeric range; displays to the user as a slider.

range

  • minimum
  • maximum
  • multipleOf
  • $capture.markFormat: "0,0" or other number format
  • $capture.marks: true | false, show tick marks on the line
  • $capture.markLabel: "auto"|"on"|"off", show label bubble
  • default
  • enum: used for labels but will only show first and last

Rating

Simplified range used for a rating generally 0-5 or 1-10.

rating

  • minimum
  • maximum
  • multipleOf
  • $capture.icons: optional icon array
  • $capture.marks: true | false, show marks on the line
  • $capture.markLabel: "auto"|"on"|"off", show label bubble
  • $capture.onClick: array matching enum that contains corresponding values when clicked or null to ignore, if not provided the clicks will not perform any action
  • default
  • enum: labels to display; they will be spaced evenly and do not need to match the full range.

Stars

Shows a star rating control

stars

  • minimum: default 1
  • maximum: default 5
  • multipleOf: default 1
  • default

Text field

Single line text field; if readonly then it will not be editable.

text | readonly

  • default

Text area

Multi line text area.

block

  • default
  • $capture.rows: how many rows to display; default is 4

Time

User settable time span. Based on the capture format the control can present hours, minutes, seconds and/or miliseconds. The format should be set to the granularity appropriate. The stored value will be seconds with miliseconds represented as decimal.

time

  • default
  • $capture.format: "hh:mm:ss:ms" or some combination

Timer

Timer that counts upwards and can be started, paused and reset by the user.

timer

  • $capture.autoStart: true | false

Title

Adds a title using the value that is preconfigured for the entry.

title

None

Toggle Button

Provides toggle button for the user to select

toggle-button

  • $data key/value pairs
  • enum flat list of values

Trigger

Presents the user with a button that can trigger an attachment action or open a wiki page.

trigger

  • $capture.trigger: camera | photo | video | wiki
  • $capture.wiki: id of the wiki page to open (if wiki)
  • $capture.attachmentCount: number to consider done or -1 for no limit

Static

A static control. The title will be styled as a header; the description will be styled as text.

static

  • $options.icon: Icon for title