Enable | Disable
Table of Contents
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:
- To disable fields for a set of users, you can define field permissions.
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>;
Param | Explanation |
---|---|
<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:
|
This task can be used in the following events
When a record is Created | |||
Workflow event | When enabling/disabling a field in a form | When enabling/disabling a subform field | |
In Form Actions | In Subform Actions | ||
On Load | Yes | Yes | Not Applicable |
On Validate | No | No | Not Applicable |
On Success | No | No | Not Applicable |
On User input | Yes | Yes | Not Applicable |
On user input of a subform field | Yes | Not Applicable | Yes |
Subform on add row | Yes | Not Applicable | Yes |
Subform on delete row | Yes | Not Applicable | Yes |
When a record is Created or Edited | |||
Workflow event | When enabling/disabling a field in a form | When enabling/disabling a subform field | |
In Form Actions | In Subform Actions | ||
On Load | Yes | Yes | Not Applicable |
On Validate | No | No | Not Applicable |
On Success | No | No | Not Applicable |
On User input | Yes | Yes | Not Applicable |
On user input of a subform field | Yes | Not Applicable | Yes |
Subform on add row | Yes | Not Applicable | Yes |
Subform on delete row | Yes | Not Applicable | Yes |
When a record is Edited | |||
Workflow event | When enabling/disabling a field in a form | When enabling/disabling a subform field | |
In Form Actions | In Subform Actions | ||
On Load | Yes | Yes | Not Applicable |
On Validate | No | No | Not Applicable |
On Success | No | No | Not Applicable |
On User input | Yes | Yes | Not Applicable |
On user input of a subform field | Yes | Not Applicable | Yes |
On Update | No | Not Applicable | Not Applicable |
Subform on add row | Yes | Not Applicable | Yes |
Subform on delete row | Yes | Not Applicable | Yes |
When a record is Deleted | |||
Workflow event | When enabling/disabling a field in a form | When enabling/disabling a subform field | |
In Form Actions | In Subform Actions | ||
On Validate | No | No | No |
On Success | No | No | No |
Other workflow events | |||
Workflow event | When enabling/disabling a field in a form | When enabling/disabling a subform field | |
In Form Actions | In Subform Actions | ||
On a scheduled date | No | No | No |
During approval process | No | No | No |
During payment process | No | No | No |
In a Custom Function | No | No | No |
In an Action item in report | No | No | No |
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; }