Get Fields
Table of Contents
Overview
This JS API task fetches the meta information of all the fields present in a Creator form, such as the field's link name, display name, type, character limit, and so on.
This V2 task is based on the Get Fields REST API V2.1. Learn more about the field's type value in the response
Request Details
Syntax
ZOHO.CREATOR.META.getFields(<config>).then(function(response){
//callback block
});
Syntax Details
The syntax holds:
- <config> (object) - The configuration required to fetch the meta information of the fields in a form. This configuration includes the following parameters.
Name | Type | Description |
app_name (Optional) | string | Link name of the application whose meta data needs to be fetched. Retrieve the link name using the Creator form's URL: https://creatorapp.zoho.com/<account_name>/<app_name>/#Form:<form_name> Note: This parameter has to be passed only when you need to pull data from other applications of the same Creator account. When not specified, data will be pulled from the current application. |
form_name | string | Link name of the form whose fields' meta information needs to be pulled. Retrieve the link name using the Creator form's URL: https://creatorapp.zoho.com/<account_name>/<app_name>/#Form:<form_name> |
Possible Errors
Refer to this page for the complete list of error codes and messages.
Sample Input
Copiedvar config = {
app_name: "zylker",
form_name: "timesheet"
};
ZOHO.CREATOR.META.getFields(config).then(function (response) {
console.log(response.fields);
});
Sample Response
Copiedresponse = {
"code": 3000,
"fields": [
{
"unique": false,
"display_name": "Phone",
"link_name": "Phone_Number",
"type": 27,
"mandatory": false
},
{
"unique": false,
"display_name": "File Upload",
"link_name": "File_upload",
"type": 19,
"mandatory": false
}
]
}