Skip to content

Required Condition

1. Overview

Required conditions are a dynamic form validation mechanism that adjusts a field's required state based on specific conditions. When user operations or data states meet preset conditions, the system automatically marks fields as required or removes the requirement, improving user experience while ensuring data completeness.

2. Use Cases

  1. Condition-triggered Required: For example, when users select "Pickup", the delivery address field can be set as non-required; if "Express Delivery" is selected, the address field becomes required.
  2. Condition-exempted Required: For example, if users have filled in ID number, the passport number field can be set as non-required.

3. Configuration Entry

必填条件.gif

For the following fields, after selecting a field, set "Required Condition" in "Component Configuration >> Advanced Configuration":

必填条件.png

After clicking required condition, the required condition configuration dialog opens;

必填条件设置.png

必填条件设置2.png

When conditions are met, this field can be set to required/non-required.

4. Supported Fields

Fields that support setting "Data Linkage" include: Input Box, Textarea, Password Input, Mention, Segmented Controller, Number Input, Radio Button, Checkbox, Select, Switch, Rating, Time, Time Range, Slider, Date, Date Range, Color Picker, Cascader, Upload, Transfer, Tree, Tree Select, Province-City-District Picker, Rich Text Editor, Unique Value, Handwritten Signature, Calculation Formula, Sub-form Selector, Slot Area, Dynamic Area

5. Examples

Example 1:

During user registration, if "Individual User" is selected, the ID number field is required; if "Enterprise User" is selected, the business license number field is required.

Example 2:

In medical consultation forms, if users check "Has Allergy History", the specific allergen field needs to be filled; if not checked, this field can be left empty.

Example 3:

In loan application forms, if users have filled in spouse information, the spouse ID number field is required; if spouse information is not filled in, this field is non-required.