List Form Fields

REST API - List Form Fields

URL

To list all fields in a Form:

https://creator.zoho.com/api/<format>/<applicationName>/<formName>/fields

where,

<applicationName> and <formName>These are the link names of your application and form, respectively. These can be referred here.
<format>This is the type of response format as listed below.

Formats

xml, json

HTTP Method

GET

Parameters

Parameter NameUsageDescription
authtokenRequiredA valid API authtoken. Refer this page to generate authtoken.
scopeRequiredSpecify the value as creatorapi
zc_ownernameRequiredThe owner of the application.

Prerequisites

Notes

  • Only the owner can see the list of fields in a form.

Sample Request

<form method="GET" action="https://creator.zoho.com/api/xml/sample/Employee/fields">
     <input type="hidden" name ="authtoken" value="************">
     <input type="hidden" name ="scope" id="scope" value="creatorapi">
     <input type="submit" value="List Forms and Views in Application">
</form>

Sample Response

The response of this API contains the name of the form and field details including:

  • Field name, Field link name, whether a field's Mandatory or not, whether No duplicate values is enabled or not, etc.
  • Their Field type value (Single Line, Email, etc.) is denoted by the value of their apiType attribute. Refer to this table for the apiType value of all field types.
  • In case the target form contains Drop down, Radio, Multi select, or Checkbox fields, their choices will also be included
  • In case the target form contains Lookup fields, the ID of 500 records in the looked-up form will also be included

XML response

<?xml version="1.0" encoding="UTF-8" ?>
     <result>
          <DisplayName><![CDATA[Employee]]></DisplayName>
          <Fields>
                    <Reqd><![CDATA[true]]></Reqd>
                    <Type><![CDATA[1]]></Type>
                    <Tooltip/>
                    <DisplayName><![CDATA[Full name]]></DisplayName>
                    <Unique><![CDATA[false]]></Unique>
                    <MaxChar><![CDATA[255]]></MaxChar>
                    <FieldName><![CDATA[Full_name]]></FieldName>
                    <Initial/>
                    <apiType><![CDATA[1]]></apiType>
          </Fields>
          <Fields>
                    <Reqd><![CDATA[false]]></Reqd>
                    <Type><![CDATA[4]]></Type>
                    <Tooltip/>
                    <DisplayName><![CDATA[Email]]></DisplayName>
                    <Unique><![CDATA[true]]></Unique>
                    <MaxChar><![CDATA[255]]></MaxChar>
                    <FieldName><![CDATA[Email]]></FieldName>
                    <Initial/>
                    <apiType><![CDATA[3]]></apiType>
          </Fields>
          <Fields>
                    <Reqd><![CDATA[true]]></Reqd>
                    <Type><![CDATA[100]]></Type>
                    <Choices>
                            <choice3><![CDATA[3183146000001847073]]></choice3>
                            <choice4><![CDATA[3183146000001847082]]></choice4>
                            <choice1><![CDATA[3183146000001847050]]></choice1>
                            <choice2><![CDATA[3183146000001847059]]></choice2>
                    </Choices>
                    <Tooltip/>
                    <DisplayName><![CDATA[Department]]></DisplayName>
                    <Unique><![CDATA[false]]></Unique>
                    <FieldName><![CDATA[Department]]></FieldName>
                    <apiType><![CDATA[12]]></apiType>
           </Fields>
     </result>

JSON response

{
  "application-name": [
    "c5-user-ed",
    {
        "form-name": [
          "Employee",
          {
            "Fields": [
              {
                  "Reqd": true,
                  "Type": 1,
                  "Tooltip": "",
                  "DisplayName": "Full name",
                  "Unique": false,
                  "MaxChar": 255,
                  "FieldName": "Full_name",
                  "Initial": "",
                  "apiType": 1
            },
            {
                  "Reqd": false,
                  "Type": 4,
                  "Tooltip": "",
                  "DisplayName": "Email",
                  "Unique": true,
                  "MaxChar": 255,
                  "FieldName": "Email",
                  "Initial": "",
                  "apiType": 3
            },
            {
                  "Reqd": true,
                  "Type": 100,
                  "Choices": [
                  {
                       "choice3": "3183146000001847073",
                       "choice4": "3183146000001847082",
                       "choice1": "3183146000001847050",
                       "choice2": "3183146000001847059"
                  }
                  ],
                  "Tooltip": "",
                  "DisplayName": "Department",
                  "Unique": false,
                  "FieldName": "Department",
                  "apiType": 12
            }
          ],
          "DisplayName": "Employee"
        }
      ]
    }
  ]
}

Error Codes

If there is an error in the request format, the corresponding error code with error message will be displayed. Please refer to the topic Error codes and descriptions to know about them. If the operation is successful, the response message will be displayed with status as "Success".

apiType value of Fields

Type of fieldapiTypevalueComments
Single Line1 -
Multi Line2 -
Email3 -
Rich Text4 -
Number5 -
Decimal6 -
Percent7 -
Currency8 -
Auto Number9 -
Date10 -
Date-time11 -
Drop Down12A field with 12 as its apiType value can also be a lookup field, which has its Display type set as Dropdown
Radio13A field with 13 as its apiType value can also be a lookup field, which has its Display type set as Radio Button
Multi Select14A field with 14 as its apiType value can also be a lookup field, which has its Display type set as Multi Select
Checkbox15A field with 15 as its apiType value can also be a lookup field, which has its Display type set as Checkbox
Lookup12 / 13 / 14 / 15The value depends on the lookup field's Display type. For example, the value will be 12 if its Display type is Dropdown, 13 if Radio Button.
Decision16 -
URL17 -
Image18 -
File Upload19 -
Formula20 -
SubForm21 -
ZohoCRM22This field stores the display value of the selected record (that's in Zoho CRM)
ZohoCRM Link23This field stores the ID of the selected record (that's in Zoho CRM)
Signature25 -
Users26 -
Phone Number27Available in Zoho Creator 5
Section28Available in Zoho Creator 5
Name29Available in Zoho Creator 5
Address30Available in Zoho Creator 5
Integration31Available in Zoho Creator 5

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohocreator.com