Choose where you’d like to start

Enable | Disable

Note: This task is applicable only to Zoho Creator.

Overview

The Disable deluge task disables a specified field on the form. The disabled field will be grayed out, and the user will not be able to add data to that field.

The Enable deluge task reverses the Disable action and re-enables a disabled field for users to fill it out in the form.

Note:

Syntax

DISABLE

  • To disable a Mainform field.
disable <field_link_name>;
 
  • To disable a Subform field
disable <subform_link_name>.<subform_field_link_name>;
 
  • To disable the Subform field in a specific subform row. This syntax can only be used in subform actions such as addition of row, deletion of row and user input of a subform field.
disable row.<subform_field_link_name>;

ENABLE

  • To enable a Mainform field.
enable <field_link_name>;
 
  • To enable a Subform field
enable <subform_link_name>.<subform_field_link_name>;
 
  • To enable the Subform field in a specific subform row. This syntax can only be used in subform actions such as addition of row, deletion of row and user input of a subform field.
enable row.<subform_field_link_name>;
ParamExplanation
<field_link_name>, <subform_link_name> & <subform_field_link_name>

Link name of the field which needs to be disabled or re-enabled.

Points to keep in mind for this parameter:

  • Since the Autonumber field type is not displayed in a form, it cannot be specified in this task.
  • For composite field types like Name and Address, the action of disabling/enabling the main field will be applied to all its subfields, by default.  To enable/disable a particular subfield you must specify it along with the main field, for example: disable Name.last_name;
  • The action of disabling/enabling the Section field type is not supported.

This task can be used in the following events

When a record is Created

Workflow eventWhen enabling/disabling a field in a formWhen enabling/disabling a subform field
In Form ActionsIn Subform Actions
On LoadYesYesNot Applicable
On ValidateNoNoNot Applicable
On SuccessNoNoNot Applicable
On User inputYesYesNot Applicable
On user input of a subform fieldYesNot ApplicableYes
Subform on add rowYesNot ApplicableYes
Subform on delete rowYesNot ApplicableYes

When a record is Created or Edited

Workflow eventWhen enabling/disabling a field in a formWhen enabling/disabling a subform field
In Form ActionsIn Subform Actions
On LoadYesYesNot Applicable
On ValidateNoNoNot Applicable
On SuccessNoNoNot Applicable
On User inputYesYesNot Applicable
On user input of a subform fieldYesNot ApplicableYes
Subform on add rowYesNot ApplicableYes
Subform on delete rowYesNot ApplicableYes

When a record is Edited

Workflow eventWhen enabling/disabling a field in a formWhen enabling/disabling a subform field
In Form ActionsIn Subform Actions
On LoadYesYesNot Applicable
On ValidateNoNoNot Applicable
On SuccessNoNoNot Applicable
On User inputYesYesNot Applicable
On user input of a subform fieldYesNot ApplicableYes
On UpdateNoNot ApplicableNot Applicable
Subform on add rowYesNot ApplicableYes
Subform on delete rowYesNot ApplicableYes

When a record is Deleted

Workflow eventWhen enabling/disabling a field in a formWhen enabling/disabling a subform field
In Form ActionsIn Subform Actions
On ValidateNoNoNo
On SuccessNoNoNo

Other workflow events

Workflow eventWhen enabling/disabling a field in a formWhen enabling/disabling a subform field
In Form ActionsIn Subform Actions
On a scheduled dateNoNoNo
During approval processNoNoNo
During payment processNoNoNo
In a Custom FunctionNoNoNo
In an Action item in reportNoNoNo

Example 1

  • The following snippet disables the "Total Amount" field.
disable Total_Amount;

Example 2

  • The following snippet disables the cost field in the subform of the order placement form.
disable row.cost;

Scenario 1: Enabling field in a job application form

Consider a job application form where there is a decision box field to distinguish the experienced and fresher candidates category. Based on the user input of the decision box field, the number field to record the years of experience will be enabled or disabled. If the candidate selects the category as experienced, the number field wiI ll be enabled to to get work experience.

if ( category == "experienced") 
{ 
enable experience_in_years; 
} 
else 
{ 
disable experience_in_years; 
}

Get Started Now

Execute