Foundry Forms is no longer the recommended approach for data entry or writeback workflows on Foundry. Instead, build user input workflows with the Foundry Ontology, representing the relevant data structures as object types and configuring the writeback interaction with Actions. Learn more in the Forms overview documentation.
You can capture metadata about a form, such as who created the response and when, by using auto-populating form fields. This page discusses the seven types of auto-populating fields available when adding a field to your form.
The calculation field displays a calculated value based on other single-value fields. Users can configure the following options:
NaN
, infinity
, or other errors.Output
(Number, Date, or Timestamp).Number precision
.Default missing value
for each parameter.Unit label
(for example, kg
or lbs
).placeholder: string
.Users can create any formula supported by the expr-eval library ↗.
The created at field displays the entry's time of creation or modification. Users can configure the following options:
Recorded format
(for example, "YYYY/MM/DD" or "DD.MM.YYYY").If you toggle on Record as local date or timestamp in the field configuration, the field will store whatever the time is in the timezone the user is in. Therefore, the time on different entries may not represent the order in which they actually occurred. You can express what timezone the entry was created in if you include the z
option in the timestamp format.
The created at field can be useful for tracking which entries are the most recent, how many entries are being created over time, or at what time of day they tend to get created.
The created by field displays the user ID of the entry's creator or modifier.
This field can be used in combination with a user attributes field to get the current user's name or email address.
The modified at field displays the entry's latest time of modification. Users can configure the following options:
Recorded format
(for example, "YYYY/MM/DD" or "DD.MM.YYYY").If you toggle on Record as local date or timestamp in the field configuration, the field will store whatever the time is in the timezone the user is in. Therefore, the time on different entries may not represent the order in which they actually occurred. You can express what timezone the entry was created in if you include the z
option in the timestamp format.
The modified at field can be useful for tracking which entries are the most recent, how often entries are being edited, or what has changed since creation and requires downstream updates.
The modified by field displays the user ID of the entry's modifier.
This field can be used in combination with a user attributes field to get the current user's name or email address.
The template field displays a concatenated value based on the value of other, single-value fields. Users can configure the following options:
placeholder: string
and errorValue: string
.Suppose you want to combine a score field and comment field in a survey. You could target "score" as variable a
and "comment" as b
. From there, create the template {{a}} - {{b}}
and get results of the form 5 - very satisfied
.
To use the property of an object referenced in the form, you can use an object property display field to select the property, hide that field, and reference it from the template field.
You can use a field configuration transform to change which fields or format the template uses based on other conditions on the values in the form. For example, you could ask respondents to select a standard response from a dropdown or let them write a custom response in a text field. A different template will be used depending on the action of the respondent.