Skip to content
Privacy Requests
Guides
Custom Request Fields
Conditional Display and Validation

Conditional Display and Validation

Any custom field can be gated on the value of another field in the same intake form by adding a display_condition rule. The Privacy Center evaluates the rule against the values the data subject has entered so far and only renders the dependent field when the rule resolves to true.

display_condition accepts either a single rule that compares one field, or a combined rule that joins multiple rules together with a logical operator.

"reason_details": {
  "label": "Tell us more",
  "field_type": "textarea",
  "required": false,
  "display_condition": {
    "field_address": "reasons",
    "operator": "list_contains",
    "value": "Other"
  }
}

A combined rule joins multiple single rules with and or or:

"california_resident_proof": {
  "label": "Proof of California residency",
  "field_type": "file",
  "required": true,
  "display_condition": {
    "logical_operator": "and",
    "conditions": [
      { "field_address": "state", "operator": "eq", "value": "California" },
      { "field_address": "marketing_opt_out", "operator": "eq", "value": true }
    ]
  }
}

Rule shape

A single rule has three attributes:

AttributeDescription
field_addressKey of another field declared in the same custom_privacy_request_fields object. Referencing an unknown key is rejected.
operatorOne of the supported operators below.
valueValue compared against the referenced field. Required for every operator except exists and not_exists, which must be supplied without a value.

A combined rule has two attributes:

AttributeDescription
logical_operatorEither and or or.
conditionsA non-empty list of single rules or nested combined rules.

Supported operators

The set of operators allowed inside display_condition is a deliberate subset of the broader Fides condition operators:

OperatorMeaningRequires a value?
eqReferenced field equals value.Yes
neqReferenced field does not equal value.Yes
existsReferenced field has been filled in (non-null).No
not_existsReferenced field has not been filled in.No
list_containsThe referenced multi-value field contains value, or value (when a list) intersects the referenced field.Yes

Operator and value compatibility

The operator and the shape of value must be compatible with the field_type of the referenced field. The matrix below summarizes the permitted combinations; any other combination is rejected when the Privacy Center configuration is saved.

Referenced field_typeAllowed operatorsvalue shape
text, textarea, select, locationeq, neq, exists, not_existsString
checkboxeq, neq, existsBoolean (true / false)
checkbox_group, multiselectlist_contains, exists, not_existsString, or a list of strings
fileexists, not_exists

display_condition rules are validated at configuration save time. Misconfigured rules — unknown field_address, an operator that is not allowed for the referenced field_type, a value whose type does not match the target, or a value supplied with exists/not_exists — are rejected with 422 Unprocessable Entity so that broken rules cannot reach the rendered intake form.