The deluge Hide keyword is used in On user input field action script and On load form action script to hide a form field, when not required. The field will not be available for viewing/editing to both the owner of the application and to people with whom you are sharing the application. The Show keyword is used to display a field that was previously hidden.
hide <field name>;
show <field name>;
Using Script Builder
To add the Hide/Show task in Script Builder,
- Invoke the Script Builder and select the required Form/Field action.
- Drag-n-drop the Hide/Show task from the left-side task tree.
- In the Hide/Show dialog, select the function "Hide" to hide a field or "Show" to show a field which is already hidden.
- Select the required field from the "Select Field Name" list-box.
- Click Done to add the script.
Refer the topic Using Script Builder for detailed steps to invoke the script builder and add the script.
The following code added to the On Add - On Load block of the Form, will hide the fields named "Activity2" and "Activity3" when the form is loaded.
- The following code is added to the On User Input block of the field named "activities" and will be executed when this field value is changed. The fields that were previously hidden during form load, will be displayed based on the value entered in this field.
if (activities >= 2)
if (activities >= 3)
- The following sample code is added to the On User input blockof the Medical_Profession field. It will display the field named "Medical_Profession_Type" only when the 'Medical Professional' checkbox field is checked.
- The following script is added to the Form Actions - On add - On Load block of a Form. The script will be executed when the Form is loaded to add a record. It will hide the form fields when the form is loaded after 01-Jan-2007 and display the message “Registration is CLOSED!”
if (zoho.currenttime > ‘01-Jan-2007 00:00:00?)
set showmessage = “Registration is CLOSED!”;
- The following On edit ->On load script will restrict access to all your shared users to edit only specific fields in your form. The script will be executed when a form is loaded for editing . The If statements will be executed if the login user is not the admin user.
if (zoho.loginuser != zoho.adminuser)
- The sample code given below will hide the field named “Name” if the currenttime is past 5.00 pm
sec = zoho.currenttime.toString(“ss”).toLong();
If ( hr >= 17 &&min >0 &&sec >0)