RSDMultipleComponentInputFieldObject

open class RSDMultipleComponentInputFieldObject : RSDInputFieldObject, RSDMultipleComponentInputField

RSDMultipleComponentInputFieldObject extends the properties of RSDInputFieldObject with information required to create a multiple component input field.

  • A list of choices for input fields that make up the multiple component option set.

    Declaration

    Swift

    public let choices : [[RSDChoice]]
  • If this is a multiple component input field, the UI can optionally define a separator. For example, blood pressure would have a separator of /.

    Declaration

    Swift

    open private(set) var separator: String?
  • Default initializer.

    Declaration

    Swift

    public init(identifier: String, choices: [[RSDChoice]], baseType: RSDFormDataType.BaseType, separator: String? = nil, uiHint: RSDFormUIHint? = nil, prompt: String? = nil)

    Parameters

    identifier

    A short string that uniquely identifies the input field within the step.

    choices

    A list of choices for input fields that make up the multiple component option set.

    baseType

    The base type for this input field.

    separator

    A separator to display between the components.

    uiHint

    A UI hint for how the study would prefer that the input field is displayed to the user.

    prompt

    A localized string that displays a short text offering a hint to the user of the data to be entered for this field.

  • Initialize from a Decoder. This method uses the RSDFormDataType.BaseType associated with this input field to decode a list of RSDChoiceObject objects with the appropriate Value type.

    Throws

    DecodingError if there is a decoding error.

    Declaration

    Swift

    public required init(from decoder: Decoder) throws

    Parameters

    decoder

    The decoder to use to decode this instance.

  • Encode the result to the given encoder.

    Throws

    EncodingError

    Declaration

    Swift

    override open func encode(to encoder: Encoder) throws

    Parameters

    encoder

    The encoder to use to encode this instance.