Hi folks,
I'm sure most of you are familiar with the Mandatory property available in our form builder. It enables you to ensure that your users enter an input in a required field. If they don't enter an input in that field, they'll be unable to submit the form. All you need to do is select the required field and just enable (check the box) the Mandatory property that you'll find in the Field Properties pane.
Whenever a mandatory field is left empty during form submission, a default alert message will pop up and prevent form submission.
This remains static for all users and doesn't override on any condition. However, there is a way to bypass this and allow a form to be submitted even without the mandatory field value. This tip will help you understand how to make a field mandatory based on a particular condition or criteria.
Let's take the example of an Employee Leave Form, which employees use to apply for leave. Regardless of the number of days employees plan to take off or have already taken, they need to add a record using the Employee Leave Form while applying for leave. While entering the details, they can choose from different leave types available. By default the five basic categories are: Sick Leave, Casual Leave, Compulsory Off, On Duty, and Others. The employees can choose Others if their reason doesn't fall in any of the above choices. However, if the employee selects the Others option and submits the form, the person approving the leave needs to know the reason to either approve or reject it.
If you mark the Leave Type field as mandatory, this wouldn't work if the user chooses the Others option. Hence, we've come up with a workaround—marking a field mandatory based on a condition using Deluge.
Let's go through it step by step.
Step 1: Create the form, with all the required fields
First, let's create a Leave Form to capture all the details. Here, we've used the following fields:
- Name (Name Field)
- Email (Email Field)
- Employee ID (Single Line field)
- Start Date (Date Field)
- End Date (Date field)
- Leave Type (Radio Button)
- Reason (Multi Line Field)
Please note that the Reason field is used to enable employees to enter the reason for their leave if they select the "Others" option in the Leave Type field.
Step 2: Hide the Reason field when the form loads
Whenever the employee selects Others in Leave Type , they need to fill in the reason for it in the Reason field. However, we can hide the field otherwise and show it only when the employee selects Others. To do that, we can create a simple workflow on the "Created or Edited - Load of the Form" condition using the below script.
Step 3: Show the Reason field only when the employee selects the Others option
As mentioned earlier, if the user selects the Others option in the Leave Type field, then the Reason field needs to be shown. For that, create a workflow in "Created or Edited - User input of field" on the Leave Type field using the the below script.
- if(input.Leave_Type == "Others")
- {
- show Reason;
- }
- else
- {
- hide Reason;
- }
Step 4: Mark the required field as mandatory using Deluge
Here comes the important part of configuring the Reason field as mandatory whenever the user selects Others as the leave type. For this, we can use a simple if statement to validate the leave type and prompt them to enter the reason. If the users selects the Others option, they have to enter details in the Reason field as well.
If the Reason field is empty, then we can display an alert asking the user to fill in the reason for their leave. Create a workflow with "Created or Edited - Validation on form submission" and this part of the workflow will get triggered once the user clicks the Submit button of the form.
- if(input.Leave_Type == "Others" && input.Reason == "")
- {
- alert(Reason,"Kindly mention the reason for the leave");
- cancel submit;
- }
Check the below-image to see how the validation works in the live form and the alert gets displayed. On clicking the Submit button, a validation will run to check if the Reason field is left empty. If it is empty, it will prevent form submission and an alert message will be shown in the pop-up.
In order to notify the user which field has to be filled, we're using the Inline Alert. Once the user clicks the OK button in the above error pop-up, an alert with our customized message will be displayed below the respective field, as shown in the image below.
We hope you try out this tip out for when you need to make a field mandatory based on conditions. We'll get back to you soon with another useful tip!
Recent Topics
JS SDK 8.0 – TypeError: Cannot read properties of undefined (reading 'getCacheStore') with sample code
Hello Zoho Support Team, I’m integrating the Zoho CRM JavaScript SDK v8.0 and I’m getting the error below when running your official sample. I tested directly from: https://github.com/zoho/zohocrm-javascript-sdk-8.0/blob/main/samples/create_records_sample/create_records.js
Function #55: Convert multiple quotes to single SO using Custom Button
Hello everyone, and welcome back to our series! In Zoho Books, after a quote is accepted by your customer, it can be converted into a sales order or an invoice. Often, a customer might have multiple quotes, and for easier billing or upon the customer's
Zoho One - Syncing Merchants and Vendors Between Zoho Expense and Zoho Books
Hi, I'm exploring the features of Zoho One under the trial subscription and have encountered an issue with syncing Merchant information between Zoho Expense and Zoho Books. While utilizing Zoho Expense to capture receipts, I noticed that when I submit
Rich Text For Notes in Zoho CRM
Hello everyone, As you know, notes are essential for recording information and ensuring smooth communication across your records. With our latest update, you can now use Rich Text formatting to organize and structure your notes more efficiently. By using
Time based workflow without edit/action
Hello I need help solving this problem if possible. We have Deals come into the CRM via Live Transfer which have the field properties: Stage = New Channel = Inbound Some of them don't get answered so we want these to automatically go into our Outbound
What's New - August 2025 | Zoho Backstage
Every month, Zoho Backstage grows with you. These updates aren't just features and fixes, they're about making your workday smoother, your events more impactful, and your attendees happier. We’ve listened, learned, and shaped this release to keep things
prevent selling expired items
Hello. I need to make a constraint on expired batch items not to be sold. Is it possible in Zoho Inventory? if so, then how? Thanks for further help.
Product details removed during update from other system
We maintain our product details in an other system. These details are synchronized with Zoho at the end of each day, through an API. This has worked perfectly sofar. But last Monday, all product codes and some other product data have been wiped during
Client Customer
I purchased a customer user license, but we cannot see the project I added in the customer account. I would like to ask for support on what we should do.
Add Ability to Use Zoho Finance Tags
For Zoho Finance (Books and Inventory), the current actions do not allow us to affect the tags associated with the entities in question (customers, vendors, items, etc.). Please consider adding this functionality into the actions.
Embeded Signing doesn't work on Safari Browser
We have implemented Zoho Sign in our website by using embeded signing, It works perfectly on Chrome. But it fails on Safari, We get stuck on Zoho Sign Page during redirection from Zoho Sign to our website after signing the document, Please let us know
Dataprep Webhook Limits and Cannot update column with Dataprep
I have two problems : 1 - I am using Airflow to trigger my pipeline, and when I tested it, it worked fine a couple of times. However, after that, I received an error: {"code":429,"message":"Request rate limited"}. I didn’t send too many requests — maybe
Power of Automation :: Automatic removal of project users once the project status is changed.
A custom function is a software code that can be used to automate a process and this allows you to automate a notification, call a webhook, or perform logic immediately after a workflow rule is triggered. This feature helps to automate complex tasks and
New in Zoho Forms: Google reCAPTCHA v3 for smarter spam protection
Hello form builders, Spam submissions are one of the biggest challenges when you share your forms online. They not only clutter your data but can also waste valuable time. To help you combat this without making life harder for genuine respondents, we’re
Project Management Bulletin: August, 2025
We’ve touched a grand 19 years since we started pioneering project management solutions with Zoho Projects. What started as a simple one-page interface is now a suite of products with Zoho BugTracker, Zoho Sprints, and our new debut Zoho Projects Plus,
Zoho Sign and Zoho Workdrive Integration
Hello, there. I want to know if it's possible to save a signed document from Zoho Sign in an specific folder for each signer in Zoho Workdrive. For example: If John Doe signs the document in Zoho Sign I want to save it automatically in a folder named
Office 365 and CRM mail integration: permission required
Has anyone run into this weird problem? My email server is Office 365. When I try to configure Zoho CRM to use this server, a Microsoft popup window opens requesting user and password. After entering that, I get a message in the Microsoft window saying
Empowered Custom Views: Cross-Module Criteria Now Supported in Zoho CRM
Hello everyone, We’re excited to introduce cross-module criteria support in custom views! Custom views provide personalized perspectives on your data and that you can save for future use. You can share these views with all users or specific individuals
How do you list multiple contacts for a lead?
My sales team wants to be able to add additional contacts for leads, how do we do that? Is there a different way we should be using the lead / contact functionality? Moderation update (9th September 2025): Our developers have built an extension to achieve
Modifying Three Dot Menu Options
Is there a way to modify the three dot menu options that display in a Report header? They currently display: Show As (List, Calendar, Timeline), Print, Import, Export. I'd like to remove the Show As and Print options, since they aren't applicable for
Field Not Updating in FSM Script - Service and Parts module.
Dear Team, I am reaching out regarding a script I have implemented in Zoho FSM to automate the calculation of the End of Service date based on the End of Sale date in the Service and Parts module. Overview of the script: Fetches the End_of_Sale__C and
Zadarma + Zoho CRM Integration – Missed Calls Saved as Contacts Instead of Leads
Hello everyone, I’m looking for input from anyone with experience using the Zadarma + Zoho CRM integration. Currently, I’m seeing that missed calls are automatically being created as Contacts instead of Leads. From a CRM perspective, this doesn’t make
Zoho Books | Product updates | September 2025
Hello users, We’ve rolled out new features and enhancements in Zoho Books. From PayNow payment method to applying journal credits to invoices and bills in other locations, explore the updates designed to enhance your bookkeeping experience. Integrate
How to update Multiple Users field in Quote Module from Deal Module
Scenario : Deal Module having Multiple User Field (Presales Engineer) which having more than 1 User and through Deluge Script I need to get that Users Details and need to put into Multiple User Field (Presales Engineer) of Quote Module. Note: Both Module
Auto-sync field of lookup value
This feature has been requested many times in the discussion Field of Lookup Announcement and this post aims to track it separately. At the moment the value of a 'field of lookup' is a snapshot but once the parent lookup field is updated the values diverge.
Clone a Module??
I am giong to repurpose the Vendors module but would like to have a separate but very similar module for another group of contacts called Buyers. I have already repurposed Contacts to Sellers. Is it possible to clone (make a duplicate) module of Vendors
Advance PDF creation from CRM data
I'm trying to create a PDF export of data in the CRM. My problem is I want a pretty complicated format for the data. I'm trying to export multiple modules worth of data, with nested one-to-many relationships between the modules. Along with that, I want
how to disable staff selection Zoho Booking integrated to SalesIQ?
currently there is only one Consultant in my Zoho Bookings like this I integrate Zoho Bookings into Zoho SalesIQ to create a chatbot. Unfortunately, even though I only have one consultant for a consultation, the user have to pick the consultant. It will
How to change the text in WhatsApp Zobot integrated to Zoho Booking?
I have integrated Zoho Bookings into Zoho SalesIQ, I want to change the text in WhatsApp when creating a booking in Zobot how to change those text?
Updating Subform Record from other Form
Just wanted to ask how to properly approach this. I have 2 forms and would like to trigger an auto update on the subform once record submitted. block below only updates 1 row for each recordRow in input.AV_System { AssetRecord = Site_Asset_Services[SOR_No
when I email a invoice how can i see it was sent and also were i can go to see all emails sent
when I email a invoice how can i see it was sent and also were i can go to see all emails sent?
Zoho Books - Hide Convert to Sales Order if it can't be used.
Hi Books team, I noticed that it is not possible to convert a Quote to a Sales Order when a Quote is not yet marked as accepted. My idea is to not show the Convert to Sales Order button when it is not possible to use it, or show it in a grey inactive
How do I bulk archive my projects in ZOHO projects
Hi, I want to archive 50 Projects in one go. Can you please help me out , How can I do this? Thanks kapil
Cross-Data Center Collaboration and / Or allowing users to choose DC
Dear Zoho Cliq Support Team, We are writing to request a significant enhancement to Zoho Cliq that would greatly benefit our geographically dispersed development team. Current Challenge: Currently, Zoho Cliq automatically routes users to specific data
Zoho Flow - Update record in Trackvia
Hello, I have a Flow that executes correctly but I only want it to execute once when a particular field on a record is updated in TrackVia. I have the trigger filters setup correctly and I want to add an "update record" action at the end of the flow to
New Mandatory One-Click Unsubscribe Link Overshadowing Custom Unsubscribe Link
I was recently informed by Zoho CRM Support that they are now mandated by the large email service providers like Google and Yahoo to provide a one-click unsubscribe option in the header (not the body) of all mass emails. I have a custom unsubscribe link
Send / Send & Close keyboard shortcuts
Hello! My team is so close to using Zoho Desk with just the keyboard. Keyboard shortcuts really help us to be more efficient -- saving a second or two over thousands of tickets adds up quickly. It seems like the keyboard shortcuts in Desk are only for
Is it possible to register webhooks in Zoho CRM using API?
Hello, I am trying to register a webhook in Zoho CRM programmatically (using the API). Specifically, I want to register a webhook that is fired when new Contacts are created in the CRM. I was able to setup a webhook using the UI, by creating a rule that
Calls where the local audio is shared, have echo
When another user is sharing their screen with audio, I get echo from my own voice. We tested this with multiple users, with different audio setups, and there's no obvious way to fix it. Is this a bug you could look into, or are we missing something?
Systematic SPF alignment issues with Zoho subdomains
Analysis Period: August 19 - September 1, 2025 PROBLEM SUMMARY Multiple Zoho services are causing systematic SPF authentication failures in DMARC reports from major email providers (Google, Microsoft, Zoho). While emails are successfully delivered due
Next Page