Repository navigation
feat(turbosign): support conditional (IF/THEN) fields - #31
Merged
Merged
Conversation
A signature field can carry an optional `metadata` object turning a checkbox into
a controller for dependent fields: `metadata.fieldKey` on the checkbox, and
`metadata.conditional` = { controllingFieldKey, operator ("is_checked" |
"is_not_checked"), action ("show" | "unlock") } on a dependent field. The fields
JSON is a passthrough, so metadata rides along unchanged; the node validates each
rule's shape and fails fast with a clear error before sending, matching the API's
400. Documented in the README with a worked example; adds a test suite.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Coordinated conditional-fields rollout — sibling PRs: TurboDocx/SDK#71 · TurboDocx/Docs#150 · TurboDocx/quickstart#24 |
This was referenced Aug 19, 2026
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds TurboSign conditional (IF/THEN) fields to the node. A signature field can carry an optional
metadataobject so a checkbox controls dependent fields:metadata.fieldKey.metadata.conditional={ controllingFieldKey, operator ("is_checked" | "is_not_checked"), action ("show" | "unlock") }.The
fieldsparameter is a raw-JSON passthrough, sometadatareaches the API unchanged — no serialization change.What changed
fieldsparameter description/hint mentionmetadata/conditional.operator,action, non-emptycontrollingFieldKey) and fails fast with a clearNodeOperationErrorbefore sending — matching the API's 400. A danglingcontrollingFieldKeyis allowed (the API fails open).metadata.conditionalinto the multipart body + rejection of malformed rules.Kept the raw-JSON
fieldsconvention (no structuredfixedCollectionUI), per the node's CONTRACT.Notes
Part of a coordinated conditional-fields rollout across the TurboDocx public repos (SDK, Docs, quickstart) — sibling PRs linked in a follow-up comment.