function
Sibling
func Sibling[Value ConditionScalar](
path string,
operator ConditionOperator,
values ...Value,
) ConditionBuild a typed predicate relative to the current object or repeating row.
Attach the returned condition with ShowWhenCondition. Sibling scope starts beside the field being shown, not at the document root, and controls admin presentation only.
Example
field.Text(
"videoURL",
field.ShowWhenCondition(
field.Sibling("format", field.ConditionEquals, "video"),
),
)Related types
ConditionScalarThe string, boolean, integer, or floating-point operands accepted by conditions.
ConditionOperatorThe finite scalar condition vocabulary.
ConditionAn immutable presentation-only logical or scalar condition.