Custom Form
since app build #3
If the item "formData" is defined in settings, the application renders a custom form for collecting extra information with each code scan. It loosely follows the jsonform specificaiton.
#
Sample formData format{ "formData" : { "schema": { "length": { "title": "Track Length in km", "type": "integer", "enum": [ 50,90 ] } }, "showOnce" : false }}
- schema - Object that describes the data model
- showOnce - If present and set to true, the custom form is not stored (persisted) and shows just once
formOrder - ["beforeScan"|"afterScan"] defines if the custom form is shown before code is scanned, or after
#
Schema itemsSchema items the actual form fields defined as keys of the "schema" key. These form fields are supported:
- radio buttons (only one option of multiple is selectabe)
text field (regular text field)
#
Radio buttons format exampleThis schema shows two form fields:
- radio button group for choosing gender
- radio button group for choosing track length
{ "schema": { "gender": { "title": "Please select gender", "type": "string", "enum": [ "male","female","other" ] }, "length": { "title": "Track Length in km", "type": "integer", "enum": [ 50,90 ] } }}
#
LimitationsThe length of form fields is not limited, but the forms do not scroll if they overflow the visible area of the device.
#
Screens workflowPlease visit the screens diagram page for more information