Configuring a Decision Box

Are you looking for a great way to get a yes or no decision from an end user? Try presenting your question in the form of a Decision box. If the user selects the box, the answer is yes. This field can have only two values - Yes or No.

Configuring a Decision box

  1. Drag-n-drop the Decision box field type to the editor area.
  2. The Field Properties screen will be displayed as shown in the screenshot below.
    • In the Field Name text box, enter the Field Label name that will be displayed in the form. The Deluge Name of the field will be same as the field name with underscore instead of white spaces, and will be assigned automatically by Zoho Creator.
    • If the Initial state is checked, the decision box will be checked by default, when the form is loaded.
  3. Click on Options and select the required field configurations. Refer the link Field Configurations to learn more about each configuration.
  4. To edit the field configurations or to delete the field or to add field action scripts, select Field Properties and make the necessary changes.
  5. When you Access the application, the Decision box will be displayed in your form.

Data type in scripting

The Boolean datatype is used in scripting for decision box.


Make Field Mandatory

Setting a field to Mandatory, forces the user to fill a value for the particular form field. 


To make a field mandatory through GUI, please refer the following link.


To make a field mandatory through script,

  • Go to edit mode of the application.
  • Click on the Form Actions --> On validate from the workflow tab.
  • Enter the code and click on "Save script " button.
  • The mandatory option is now enabled for the particular field.

For example, the sample script shown below indicates the user that the field value is mandatory and requires data to be entered in the field.

if ( (input.Terms and conditions== false) )

alert "Please agree to the terms and conditions";
cancel submit ;

In the above code, input.Terms and conditions is the field where the field value is mandatory.

Set default value 

Now you can set a default value for a field in the form. There are two possible ways to perform this action.


To set default value for a field through GUI, please refer the following link.


You can use this option to set up dynamic values to fields. Setting today's date for a Date field, current time for a Date-Time field, logged in user's email for Email field are some examples.

This can also be used for the fields where you see the "Initial Value" option missing.

1. In the edit mode, click on workflow tab.

2. Go to On Add -> On Load script section of the Form.

3. Enter the code shown below and click on "Save script " button.

    input.field name = false

4. Now you can see the default value in the field while accessing the application.


The permission option supports the show/hide functionality to create forms that hide the information from the user or adjust the fields while the user is entering the data . There are two possible ways to perform this action.


To enable the show/hide functionality from the GUI, please refer the following link.

  • Go to  Form Actions -> on add ->on load .
  • Enter the code and click on "Save script " button.
  • Now access the application to find the changes made in the script section.

In the Form Actions -> on add ->on load script of the form, hide the required fields and provide restricted access to selected fields. A sample script is shown below:

if ( (zoho.adminuser != zoho.loginuserid) )    

    hide T & C;

In the above example, T & C refers to the field name of the decisionbox.