dynamic-forms / Interface

HttpCondition

Condition that evaluates based on an HTTP response from a remote server.

The HTTP request is resolved reactively — when dependent form values change, the request is re-evaluated (with debouncing). The result is cached per resolved request to avoid redundant network calls.

Since LogicFn must return boolean synchronously, this condition uses a signal-based async resolution pattern internally.

Properties

NameTypeDescription
cacheDurationMs
number | undefined

Cache duration in ms for HTTP responses. @default 30000

debounceMs
number | undefined

Debounce time in milliseconds for re-evaluation when dependent form values change. @default 300

http
HttpRequestConfig

HTTP request configuration

pendingValue
boolean | undefined

Value to return while the HTTP request is in-flight.

Choose based on the logic type and desired UX:

  • For hidden: false = visible while loading, true = hidden while loading
  • For disabled: false = enabled while loading, true = disabled while loading
  • For required: false = optional while loading, true = required while loading

@default false

responseExpression
string | undefined

Expression to extract boolean from response (scope: { response }). e.g. 'response.allowed', 'response.permissions.canEdit' When omitted, the entire response is coerced to boolean: !!response

type
"http"