EntryField
The EntryField field allows you to pass a field of a previously selected Entry. You reference another form field (which must be of type Entry
), and as soon as this field is filled, every corresponding EntryField
field will be updated with the appropriate values. An EntryField
can therefore not be filled manually.
This field type is useful for a visual feedback, passing fields onwards and showing or hiding Pages with conditional rendering.
Â
Field options
Name | Type | Description |
---|---|---|
name | string | The name by which the field will internally be referenced |
displayText | string | The main field label displayed above the field |
description | string | An additional description displayed below the main label |
options | object | Additional field options (see below) |
options.confirmation | boolean | Whether to include this field in the confirmation page |
options.parentFormField | string | The name of the form field that, when filled, should act as the parent from which the value will be extracted. In the example image above, this would be |
options.entryFieldKey | string | The key the should be extracted from the selected entry. In the example above this would be |
options.hidden | boolean | It can sometimes be useful to hide an entryfield field (e.g. to use it only for conditional rendering). Set this to true to hide the field. |
JSON Example
This example uses an Entry
field called Contact
with 3 corresponding EntryField
fields. When the Entry
field is filled, the 3 values will be extracted from the chosen entry and automatically filled into the EntryField
fields.
{
"name": "Contact",
"displayText": "Contact",
"description": "Select a contact",
"type": "Entry",
"options": {
"sectionId": "src-contacts",
"primaryFieldKey": "Email",
"secondaryFieldKey": "JobDescription"
}
},
{
"name": "ContactName",
"displayText": "Name of the contact",
"type": "EntryField",
"options": {
"parentFormField": "Contact",
"entryFieldKey": "Full"
}
},
{
"name": "ContactAddress",
"displayText": "Address of the contact",
"type": "EntryField",
"options": {
"parentFormField": "Contact",
"entryFieldKey": "Address"
}
},
{
"name": "ContactJob",
"displayText": "Job of the contact",
"type": "EntryField",
"options": {
"parentFormField": "Contact",
"entryFieldKey": "Job"
}
},