Configuring Request Modeler Actions for Self-Designed Forms
Canvas Studio now enables you to map the action buttons on self-designed forms with the Request Modeler actions using Event Wiring option. The advantage of this feature is that you need not write code for the Submit or Save buttons on self-designed forms and instead use the Request Modeler to take care of form data submission.
 Let us assume that the following EMP DETAILS form is created using Form Designer and the form ID is EMP_DETAILS_FORM. The employee details such as Name, ID, Unit, and Mobile Number can be entered on the form.
In order to use the Request Modeler actions for the form buttons, you must create a request using Request Modeler for the same workflow and then map the Request ID as the Request Model ID for the EMP_DETAILS_FORM using Form Designer as shown in the following screenshot.
You must also ensure that the form item IDs on the EMP_DETAILS_FORM are similar to the form items ID in the form created by the Request Modeler for the same purpose. You must then wire the Submit and Save as Draft action buttons on the EMP_DETAILS_FORM to the Request Modeler Submit and Save as Draft actions.
Perform the following steps in order to invoke request modeler actions in the form:
1. Open the self-designed form in Form Designer and click any one of the buttons on the form, e.g. SAVE AS DRAFT button field and then click the Event Wiring icon.
The Event Wiring window appears.
2. In the Events field, select the Click event.
The Rule ID is auto-generated. You can also alter it without leaving space in between.
3. Click Action/Launch icon and select the Execute the Request Modeler Action option.
The Execute the Request Modeler Action window appears.
4. Click the Model ID option and select a request modeler ID from the list of existing request modelers IDs, e.g. EMP_DETAILS.
Here, the Model ID refers to the Request ID in request modeler.
5. Enter an action on the Action field. In this example, SAVE AS DRAFT is entered as an action.
It is mandatory to provide any one of the following actions:
• SUBMIT
• SAVE AS DRAFT
• CANCEL
• DELETE
6. Click the Live Mode option and select a live mode if required. This option enables the user to perform live actions on the form. Edit and Delete are the two live modes available here.
7. Enter a success message on the Success Message field if required.
8. Enter a failure message on the Failure Message field if required.
9. Enter the callback function name on the callback field if you have used a callback function on the register handler.
10. Click Save to save the request modeler action wiring.
11. Similarly, to map action for other buttons on the form to Request Modeler actions, repeat the steps 1 to 10.