Prompt types
Prompts / Prompts are divided into three groups:
- standard - Standard prompts
- portion-size - Portion-size estimation prompts
- custom - Custom / generic prompts
Standard prompts
Prompts with standardized behavior tied to specific functionality. Usually only one can be used per scheme and functionality is often tied to specific scheme section.
Addon foods prompt
Prompt to add additional foods as linked foods. Prompt can be added to food
, meal
or survey
level.
multiple
- allow multiple foods to be selectedtrigger
- trigger options for which foods to trigger addon foods prompttype
- type of triggerany
- trigger for any foodafp
- trigger for associated foods (TBI)category
- trigger for food having specified category codefood
- trigger for food having specified food codetag
- trigger for food having specified food tag
value
- value to trigger on (fill in forcategory
,food
ortag
trigger types)
lookup
- lookup to include food for add-onstype
- type of lookupcategory
- look up foods by specified categoryfood
- look up specified by food
value
- value to lookup (fill in forcategory
orfood
lookup types)
Associated foods prompt
multiple
- allow multiple foods to be selected
Food browser settings
- Show categories first
food browse list
- Show categories first in the browse listfood search list
- Show categories first in the search list
Edit meal prompt
Edit meal prompt allows initial entry of food and drink before portion-size estimation.
Options
separateDrinks
- show drinks separately
External source prompt
Prompt to collect external source of food matching.
Source options
type
- external source type / provideropen-food-facts
- Open Food Factscountry
- country codequery
- key:value pairs of query parameters
Barcode options
none
- no barcode scannerquagga
- Quagga2 barcode scanner (open-source)strich
- Strich barcode scanner (subscription-based)
Final prompt
Terminal prompt that is shown at the end of the recall. It offers home button It can offer feedback is applicable (feedback enabled and submission threshold reached).
rating
- 5-star rating with optional comment to be submitted after the recall
Food search prompt
Food browser settings
- Show categories first
food browse list
- Show categories first in the browse listfood search list
- Show categories first in the search list
Meal add prompt
Prompt to add new meals. Multi-select list of options predefined in the scheme meal list.
Options
custom
- allow adding custom meal namesunique
- allow adding only unique meal names
Meal duration prompt
Prompt to collect meal duration in minutes.
TIP
Prompt uses slider component as slider-prompt, but it is more constrained, keep in mind that:
- meal duration is always in minutes
- labels should reflect the minutes unit
Slider settings
current
- current duration in minuteslabel
- label to be displayedvalue
- current valuesize
- droplet size (inpx
) of the label
min
- minimum duration in minuteslabel
- label to be displayed at the start of the slider (min value) (use{value}
to insert variable value into the label)value
- minimum value
max
- maximum duration in minuteslabel
- label to be displayed at the end of the slider (max value) (use{value}
to insert variable value into the label)value
- maximum value
step
- step size in minutes
Meal gap prompt
Prompt to remind user about meal gap between meals.
Options
gap
- time gap between meals (minutes)startTime
- day start timeendTime
- day end time
Meal time prompt
Prompt to collect meal time information using standard time picker.
Options
allowedMinutes
- allowed minutes for selection (1
,5
,10
,15
,20
,30
)format
- time format (am/pm
or24h
)
Ready meal prompt
Prompt to collect ready meal information. Multi-select list of options, for each food within the meal that has ready-meal
attribute set to true
.
Recall date prompt
Prompt to collect recall date information.
current
- highlighted current date offset in daysmin
- minimum date offset in daysmax
- maximum date offset in days
Redirect prompt
Prompt to redirect user to external site with optional user identifier embedded into URL.
Options
rating
- 5-star rating with optional comment to be submitted after the recallurl
- URL to redirect to- use
{identifier}
variable as a placeholder where the user identifier should be to inserted. - example:
https://example.com/?arg={identifier}
- use
identifier
- identifier that should be embedded into the URL.userId
- internal intake24 user idusername
- survey-unique respondent usernameurlAuthToken
- URL authentication tokencustom
- custom identifier that can be set throughuserCustomField
.- Enter a
name
of the custom field to be looked up thevalue
.
- Enter a
target
- target window for redirection_blank
- open in a new window_self
- open in the same window
timer
- optional timer in seconds when automatic redirection should occur- if set to
0
, timed redirection is disabled - if set to negative value, redirection is immediate
- if set to
Review confirm prompt
Same as before prompt
Prompt to detect foods that are the same as in the previous recalls / meals and offer to use the same portion-size estimation.
Split food prompt
Prompt to identify foods that can potentially be split into separate foods.
Submit prompt
Prompt with recap of the recall and submit button.
Options
review
- defines rules (per layout,desktop | mobile
) how review step is enforced before submissionfalse
- no review step, submit button is always enabledscroll
- button is enabled when scrolled through the meal list to the endcheckbox
- button is enabled when all meal checkboxes are tickedonecheckbox
- button is enabled when one survey level checkbox is ticked
Portion-size prompts
Prompts for food portion-size estimation. Only one can be used per scheme and functionality is tied foods
scheme section.
As-served prompt
Options
badges
- show quantity badge on expansion panel headerleftovers
- show leftovers option
Cereal prompt
Options
badges
- show quantity badge on expansion panel headerleftovers
- show leftovers optionimage map settings
- image map settingsimage map labels
- show image map labelsimage map pinchZoom
- show PinchZoom control for mobile UI labels
Direct weight prompt
Drink scale prompt
Options
badges
- show quantity badge on expansion panel headerleftovers
- show leftovers optionimage map settings
- image map settingsimage map labels
- show image map labelsimage map pinchZoom
- show PinchZoom control for mobile UI labels
multiple
- allow multiple item to be selected. When enabled, additional options are available:false
- disable multiple selectioncounter
- counter-style multiple selectionslider
- slider-style multiple selection
Counter settings
current
- current valuemin
- minimum valuemax
- maximum valueconfirm
- require confirmationwhole
- use whole numbersfraction
- use fractions
Slider settings
current
- current value settingslabel
- label to be displayedvalue
- current valuesize
- droplet size (inpx
) of the label
min
- minimum value settingslabel
- label to be displayed at the start of the slider (min value) (use{value}
to insert variable value into the label)value
- minimum value
max
- maximum value settingslabel
- label to be displayed at the end of the slider (max value) (use{value}
to insert variable value into the label)value
- maximum value
confirm
- require confirmation
Slider options
current
- current value settingslabel
- label to be displayedvalue
- current valuesize
- droplet size (inpx
) of the label
min
- minimum value settingslabel
- label to be displayed at the start of the slider (min value) (use{value}
to insert variable value into the label)value
- minimum value
max
- maximum value settingslabel
- label to be displayed at the end of the slider (max value) (use{value}
to insert variable value into the label)value
- maximum value
confirm
- require confirmation
TIP
Prompt uses slider component as slider-prompt, but it is more constrained, keep in mind that:
- slider has decrement/increment buttons, so
min
andmax
labels won't be displayed - consider settings in context of
multiple
option that prompt is collecting - number if items related to selected food
Guide image prompt
Options
badges
- show quantity badge on expansion panel headerimage map settings
- image map settingsimage map labels
- show image map labelsimage map pinchZoom
- show PinchZoom control for mobile UI labels
linked quantity settings
- Allows to trigger quantity selection prompt for linked parent food
Automatically apply linked quantity
- skips prompt panel with quantity selectionSource categories to trigger
- child food's categories it should trigger onParent categories to link
- parent food's categories it should trigger on- Optional standard unit can be assigned to set the
how-many
label
- Optional standard unit can be assigned to set the
Milk in a hot drink prompt
Options
badges
- show quantity badge on expansion panel header and option labelsorientation
- orientation of radio buttons (column/row)
Milk on cereal prompt
Options
badges
- show quantity badge on expansion panel headerimage map settings
- image map settingsimage map labels
- show image map labelsimage map pinchZoom
- show PinchZoom control for mobile UI labels
Parent food portion prompt
Calculates portion size based on parent food portion size.
Options
badges
- show quantity badge on expansion panel header and option labelsorientation
- orientation of radio buttons (column/row)
Pizza prompt
First iteration for pizza estimation
Options
badges
- show quantity badge on expansion panel headerimage map settings
- image map settingsimage map labels
- show image map labelsimage map pinchZoom
- show PinchZoom control for mobile UI labels
Pizza V2 prompt
Second iteration for pizza estimation
Options
image map settings
- image map settingsimage map labels
- show image map labelsimage map pinchZoom
- show PinchZoom control for mobile UI labels
Portion size option prompt
Portion size option selection prompt
Recipe builder prompt
Recipe builder prompt for foods with multiple ingredients, such as sandwiches, salads etc. Recipe foods can be defined in locales recipe-foods.
Food browser settings
- Show categories first
food browse list
- Show categories first in the browse listfood search list
- Show categories first in the search list
Standard portion prompt
Custom prompts
Prompts with customizable generic behavior. Custom prompts can be used multiple times per scheme as long as they are identified with scheme-unique Prompt ID
.
Checkbox list prompt
Multi-select list of options.
Options
options
- locale-specific list of options with properties:label
- (user-facing displayed value)value
- (value stored in database) can be specifiedexclusive
- exclusive flag - if selected, other options are deselected
other
-true
orfalse
whether to show 'other' option, free-form text inputmin
- Minimum number of answersmax
- Maximum number of answers
Date picker prompt
Prompt to collect date information.
current
- highlighted current date offset in daysmin
- minimum date offset in daysmax
- maximum date offset in days
Info prompt
Informational prompt for acknowledging displayed information.
No more information prompt
Terminal prompt for food
or meal
when no more information is required. It should be placed in foods
and postFoods
sections respectively.
Select prompt
Prompt to collect single or multiple option(s) from a list of options using select box.
Options
multiple
-true
orfalse
whether to allow multiple options to be selectedoptions
- locale-specific list of options with properties:label
(user-facing displayed value)value
(value stored in database) can be specified
Slider prompt
Prompt to collect numeric information using slider.
Slider options
current
- current value settingslabel
- label to be displayedvalue
- current valuesize
- droplet size (inpx
) of the label
min
- minimum value settingslabel
- label to be displayed at the start of the slider (min value) (use{value}
to insert variable value into the label)value
- minimum value
max
- maximum value settingslabel
- label to be displayed at the end of the slider (max value) (use{value}
to insert variable value into the label)value
- maximum value
step
- step size
Radio list prompt
Single-select list of options.
options
- locale-specific list of options with properties:label
(user-facing displayed value)value
(value stored in database) can be specified
other
-true
orfalse
whether to show 'other' option, free-form text inputorientation
- orientation of radio buttons (column
orrow
)
Textarea prompt
Prompt to offer free-form text input.
Time picker prompt
Prompt to collect time information.
allowedMinutes
- allowed minutes for selection (1
,5
,10
,15
,20
,30
)format
- time format (am/pm
or24h
)
Yes/no prompt
Prompt to collect yes
/ no
(true
/ false
) information presented as distinct buttons.