-
Notifications
You must be signed in to change notification settings - Fork 2
Render Conditions
lallysmbc edited this page Aug 17, 2020
·
6 revisions
Render conditions allow you to specify the conditions required for a page to render. As such, in your DSL you can have multiple pages with the same page-slug eg "success", but different conditions for each page. The most common use case for this will be multiple success pages for different journeys, however it can be applied to any page (although the first page of a form shouldn't have any conditions).
The base condition
object is the same as Conditions, with slightly different structure depending on what data type you're checking against.
{
"Title": "Thank you for submitting your views on fruit",
"BannerTitle": "Thank you for telling us you like apples best",
"LeadingParagraph": "Some additional information",
"PageSlug": "success",
"RenderConditions": [
{
"questionId": "doYouLikeFruit",
"conditionType": "EqualTo",
"comparisonValue": "yes"
},
{
"questionId": "favouriteFruit",
"conditionType": "EqualTo",
"comparisonValue": "Apples"
}
],
"Elements": [
{
"Type": "h2",
"Properties": {
"Text": "What happens next"
}
},
{
"Type": "p",
"Properties": {
"Text": "We will contact you shortly to confirm if your request has been accepted."
}
}
]
}
- The first page of a form shouldn't have any render conditions (as there is no data to check against yet)
- You can't have more than 1 same-slug page with empty render conditions. An error will be thrown.
- Conditions will be processed by highest number first eg. A page with 3 conditions will be checked before a page with 2 conditions, regardless of the order the pages are in the DSL.
- You can check an optional question value, but you have to do a IsNullOrEmpty condition before the specific value condition eg.
"RenderConditions": [
{
"questionId": "doYouLikeFruit",
"conditionType": "EqualTo",
"comparisonValue": "yes"
},
{
"questionId": "favouriteFruit",
"conditionType": "IsNullOrEmpty",
"comparisonValue": "false"
},
{
"questionId": "favouriteFruit",
"conditionType": "checkBoxContains",
"comparisonValue": "Apples"
}
]
- Availability
- Actions
- Behaviours
- Breadcrumbs
-
Conditions
- String Conditions
- Date Conditions
- Integer Conditions
- File Upload Conditions
- Custom validation
-
Elements
- AddAnother
- Address
- Button
- Booking
- Checkbox
- Date Input
- Date Picker
- Declaration
- Document Download
- Document Upload
- File Upload
- H1-H6
- HR
- Image
- Inline Alert
- Link
- Map
- Multiple File Upload
- OrderedList
- Organisation
- P
- Radio
- Select
- Street
- Summary
- Success page
- Textarea
- Textbox
- Time input
- Unordered List
- Uploaded files summary
- Warning
- EnabledFor
- Feedback form
- File uploads
- Form Schema
- Header
- Inbound Values
- Integrating with PowerAutomate/0365
- Lookup
- Page
- Payment & Payment calculations
- Preview data structure
- Render conditions
- Reusable elements
- Structure tests
- Success page
- Tag parsers
- Target mapping
- Validators