How can I make a field to be "required" dynamically?

How can I make a field to be "required" dynamically?

Assume you have a radio button field named Field1 in your form with values "Yes"/ "No" and you want Field2 to be required only if the value ofField1 is "Yes". To achieve the given scenario, add the given script to Form Actions -> On add -> validate section of the Script tab. 

if ((input.field1 == "Yes") && (input.field2 == null))
{
alert "Enter a value for field2";
cancel submit;
}

The above script checks if there is any data input into field2 when field1 value is "Yes". If there is no data, submit is canceled and an alert message is displayed.


    • Related Articles

    • How to dynamically filter a multiselect field

      The method of filtering a multi-select field is very similar to dynamically filtering single-select dropdowns as described here. However, the problem with filtering a multiselect is that when you edit the record the filtered list is not shown and all ...
    • Field Limit

      Orchestly allows users to create custom fields within a specific limit. This limit applies to the organizational level, wherein the field count is calculated for all the layouts and blueprints used in the entire organization.  Field Name Field Limit ...
    • Field Level Customization

      Field-level customization allows you to create and organize fields in Zoho Recruit to meet your recruitment requirements. Zoho Recruit has some standard, default fields and allows users to add more industry-specific fields. Some of these fields are ...
    • Edit a field

      Sign in to the Zoho One Admin Panel. Go to Users and click Manage Fields. Hover over the required field, and click Edit. Make the required changes. In custom fields, everything except Field Type can be edited. In system fields, you can restrict the ...
    • Field and Link Permission

      Set Access Permissions for Fields With the field-level security, you can control the access rights of Recruit fields for various profiles. This will ensure smooth security at the field-level, allowing users to access the fields that are relevant to ...