Button - smbc-digital/form-builder GitHub Wiki
Refer to Stockport Design System for styling information and reference images
DSL properties
Property | Type | Required | Default Value | Description |
---|---|---|---|---|
ButtonId | string | ✔️ | ❌ | Button id that is unique to the page (For Continue buttons, use the buttonId 'continue') |
Text | string | ❌ | Continue/ Submit - for SubmitForm behaviour | Text describing the action the button performs |
ClassName | string | ❌ | govuk-button | Adds class to the button, ie: govuk-button--secondary |
Disabled | bool | ❌ | false | Disables the button |
DisableOnClick | bool | ❌ | false | Disables the button after a user has clicked the button NOTE: This is enabled on the initial lookup search pages and any page which has a SubmitForm or SubmitAndPay action type |
Button examples
DS Json for button:
{
"Title": "Your hobbies",
"PageSlug": "your-hobbies",
"Elements": [
{
"Type": "Button",
"Properties": {
"ButtonId": "continue"
}
}
]
}
All possible properties example:
{
"Type": "Button",
"Properties": {
"ButtonId": "continue",
"Text": "Custom text",
"ClassName": "govuk-button--warning",
"Disabled": false,
"DisableOnClick": true
}
}