RSDFormDataType

public enum RSDFormDataType

RSDFormDataType is used to describe the data type for a form input. This is different from the RSDAnswerResultType which is a struct that can be used to encode and decode the input field answer value. This describes the type of information required by the input field.

  • Base data types are basic types that can be defined with only a base type.

    Declaration

    Swift

    case base(BaseType)
  • Collection data types are some kind of a collection with a base type.

    Declaration

    Swift

    case collection(CollectionType, BaseType)
  • A measurement is a human-data measurement. The measurement range indicates the expected size of the human being measured. In US English units, this is required to determine the expected localization for the measurement.

    For example, an infant weight would be in lb/oz whereas an adult weight would be in lb. Default range is for an adult.

    Declaration

    Swift

    case measurement(MeasurementType, MeasurementRange)
  • A postal code is a custom input field that only stores a part of the participant’s postal code (zipcode). This is to protect the participant’s privacy. Typically, this will mean only storing the first 3 characters of the postal code. The base type for a postal code is always a string.

    Declaration

    Swift

    case postalCode
  • A detail form data type is a data type that represents an input field where the data entry uses a detail that displays information using one or more input fields. The default base type is .codable.

    Declaration

    Swift

    case detail(BaseType)
  • Custom data types are undefined in the base SDK.

    Declaration

    Swift

    case custom(String, BaseType)
  • The base type of the form input field. This is used to indicate what the type is of the value being prompted and will affect the choice of allowed formatters.

    See more

    Declaration

    Swift

    public enum BaseType : String, CaseIterable
  • The collection type for the input field. The supported types are for choice-style questions or multiple component questions where the user selected from one or more fields to build a single answer result.

    See more

    Declaration

    Swift

    public enum CollectionType : String, CaseIterable
  • A measurement type is a human-data measurement such as height or weight.

    See more

    Declaration

    Swift

    public enum MeasurementType : String, CaseIterable
  • The measurement range is used to determine units that are appropriate to the size of the person.

    See more

    Declaration

    Swift

    public enum MeasurementRange : String, CaseIterable
  • List of the standard UI hints that are valid for this data type.

    The valid hints are returned in priority order such that if the preferred hint is not supported by the UI then a fall-back will be selected. For example, .base(.date) will return .picker as its preferred hint, whereas .base(.integer) will return .textfield, but both support .textfield and .picker.

    Declaration

    Swift

    public var validStandardUIHints: [RSDFormUIHint] { get }
  • The set of ui hints that can display using a list format such as a scrolling list.

    Declaration

    Swift

    public var listSelectionHints: Set<RSDFormUIHint> { get }
  • The BaseType for this form type. All data types have a base type, though some carry additional information.

    Declaration

    Swift

    public var baseType: BaseType { get }
  • Maps the base type of the RSDFormDataType to the base type of the RSDAnswerResultType.

    Declaration

    Swift

    public func defaultAnswerResultBaseType() -> RSDAnswerResultType.BaseType

    Return Value

    the default result answer type for this input field.

  • List of all the standard types.

    Declaration

    Swift

    public static func allStandardTypes() -> [RSDFormDataType]
  • Declaration

    Swift

    public init?(rawValue: String)
  • Declaration

    Swift

    public var rawValue: String { get }