ReadOnlyTextCollector
public class ReadOnlyTextCollector : Collector, @unchecked Sendable
This class handles the response from a DaVinci form field of inputType READ_ONLY_TEXT . It displays read-only text content such as agreement/terms-of-service text.
Example JSON:
{
"type": "AGREEMENT",
"inputType": "READ_ONLY_TEXT",
"key": "agreement",
"content": "This is example agreement text...",
"titleEnabled": true,
"title": "Terms of Service Agreement",
"agreement": {
"id": "6ff30c9e-cd98-4fe5-85ca-01111ca20702",
"useDynamicAgreement": false
},
"enabled": true
}
-
The UUID of the collector.
Declaration
Swift
public var id: String { get } -
The key identifier for this collector, used as the form field key during submission.
Declaration
Swift
public private(set) var key: String { get } -
The type of this collector (e.g., “AGREEMENT”).
Declaration
Swift
public private(set) var type: String { get } -
The agreement text content to display to the user.
Declaration
Swift
public private(set) var content: String { get } -
The title of the agreement (shown when
titleEnabledis true).Declaration
Swift
public private(set) var title: String { get } -
Whether to display the
titleabove the agreement content.Declaration
Swift
public private(set) var titleEnabled: Bool { get } -
Whether this collector is enabled.
Declaration
Swift
public private(set) var enabled: Bool { get } -
The unique ID of the agreement definition.
Declaration
Swift
public private(set) var agreementId: String { get } -
Whether the agreement content is loaded dynamically.
Declaration
Swift
public private(set) var useDynamicAgreement: Bool { get } -
Initializes a new instance of
ReadOnlyTextCollector.Declaration
Swift
public required init(with json: [String : Any])Parameters
jsonThe json to initialize from.
-
Initializes the
ReadOnlyTextCollectorwith the given value. TheReadOnlyTextCollectordoes not hold any value.Declaration
Swift
public func initialize(with value: Any)Parameters
valueThe value to initialize the collector with.
-
Function returning the
Payloadof the ReadOnlyTextCollector. This is a function that returnsNeveras a nonreturning function as the ReadOnlyTextCollector has no payload to return.Declaration
Swift
public func payload() -> Never?
View on GitHub