Setting up footer buttons
Footer buttons are optional buttons located in the footer of dependent forms.
To set up a footer button
Open the dependent form.
Click + New footer button.
Enter the button label in the Label field.
- Select the button type from the Type dropdown.Each type has a different style:
Primary
Secondary
Danger
Ghost
Promo
Translucent
- On clickThe action executed when the user clicks the button.
- Close FormThe form closes if the user clicks the button.
- CallbackA callback is executed.
Choose the callback from the Callback name dropdown.
Specify any request and response mappings you require
- Open formA form is opened.
Choose the Mode:
Popup
Sidebar
Note
The demo CyberApp illustrates both options.
Choose the form in the Form name dropdown.
[Optional] Map input parameters
- OtherSelect the Action type from the dropdown:
- Set Parameters
This option allows you to explicitly set form element and input parameter values if the user clicks the button. A common use for this functionality is for a reset filters button without executing a callback.When you select this option, an JSON edit panel appears, where you must provide JSON to apply when the user clicks the button. The edit panel is interactive: it suggests element IDs and parameters as you type, highlights invalid IDs and parameters, and indicates invalid values. - No actionThe button does nothing.
Example
In this example, an Open form footer button is added to the User details dependent form. User details has four form model data items:
- useridAn input parameter, which is mapped to the userid form model data item of the root form when a user clicks to view a specific user’s details.This is used to map to the request payload of the User details data initializer callback, which returns the other three form model data items.
- userfirstnameAn input element, which is mapped to the data initializer callback response payload.
- usersecondnameAn input element, which is mapped to the data initializer callback response payload.
- useremailAn input element, which is mapped to the data initializer callback response payload.
The Open form footer button opens the User contact details dependent form. User contact details requires userid to map to the data initializer callback request payload, so the developer must create an input parameter on User contact details and performs the request mapping. The developer then maps the source form (user details) userid form model data item to this new target form (User contact details) userid input parameter. The developer also maps the three input element data items on the source form to corresponding input element data items in the target form. The rest of the user contact data is mapped from the data initializer callback response payload to the UI elements.