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
}
  • id

    The UUID of the collector.

    Declaration

    Swift

    public var id: String { get }
  • key

    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 titleEnabled is true).

    Declaration

    Swift

    public private(set) var title: String { get }
  • Whether to display the title above 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

    json

    The json to initialize from.

  • Initializes the ReadOnlyTextCollector with the given value. The ReadOnlyTextCollector does not hold any value.

    Declaration

    Swift

    public func initialize(with value: Any)

    Parameters

    value

    The value to initialize the collector with.

  • Function returning the Payload of the ReadOnlyTextCollector. This is a function that returns Never as a nonreturning function as the ReadOnlyTextCollector has no payload to return.

    Declaration

    Swift

    public func payload() -> Never?