Form Submit Handler

Form Submit Handler

Overview

The form submit handler is triggered when the user clicks the submit button in the form. This handler is used to validate the input data entered by the user and perform the custom menu's intended action.

Implementation of Form Submit Handler

The information will be passed through the following attributes to the form submit handler:
 
form
Input collected from the user.
user
Details of the user executing the menu.
entity
Details of the entity in which the menu is being used.
network
Details of the network  in which the menu is being used.
 

Rendering a response

When a custom action is executed, the response rendered can be made visible to the menu executor. You can also show an error message using this handler.
 
The response should be in the format below:
 
Attribute
Property
Description
result
options: success / failure
Default option: success
The status of the function execution.
message
Data type: String
Maximum limit: 250 characters
A message informing the user about the status of the menu execution.

Sample code for displaying a success message: 
  1. {

    "result" : "success",

    "message" : "Message shared successfully" }


Sample code for displaying a failure message:
  1. {

    "result" : "failure",

    "message" : "Sorry unable to share the post with with Mark" }


If you have any questions related to Custom Menu, please write to us at support@zohoconnect.com. We'll be happy to help.