Page - smbc-digital/form-builder GitHub Wiki
This is a full page object, Page objects are used to define what to render to the user on a given page.
{
"Title": "Page Title",
"PageSlug": "page-slug",
"HideTitle": true,
"HideBackButton": true,
"DisplayOptionalInTitle": true,
"DisplayBreadcrumbs": true,
"Elements": [],
"RenderConditions": [],
"IncomingValues": [],
"PageActions": [],
"Behaviours": []
}
To begin add the PageSlug and Title and HideBackButton
PageSlug is the page url (do not use spaces use -, the page slug should describe the page)
Title is the page title and appears in the tab of the browser
HideBackButton by default the back button is displayed, but you can hide the button by passing true to this property. This is useful on the First page of the form or the Sucess page
{
"Title": "Page Title",
"PageSlug": "page-slug",
"HideTitle": true
}
DisplayOptionalInTitle. This property will add 'optional' text next to the heading of the page. This is only required for MultipleFileUpload due to how the element is created it is not possible to add optional next to the heading and this is a work around for now to allow optional to be placed next to the heading when required.
DisplayBreadcrumbs detemins wether to render the breadrcumsb, By default this is disabled and is normally enabled on Success pages and Endpoint pages
Elements
Add elements required for your page.
Elements are the main objects in your page object these define what is rendered to the user, whether it be a textbox, textarea or datepicker to name a few element types. These are defined within the Elements array of the page object, all elements have a properties object within them where configuration is defined.
"Elements": [
{
"Type": "Textbox",
"Properties": {
"QuestionId": "textbox",
"Label": "Example textbox"
}
}
],
RenderConditions
Add render conditions to your page
IncomingValues
How to add Inbound values to your page
PageActions
How to add Page actions to your page
Behaviours
How to add behaviours to your page