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
identifierA short string that uniquely identifies the input field within the step.
choicesA list of choices for input fields that make up the multiple component option set.
baseTypeThe base type for this input field.
separatorA separator to display between the components.
uiHintA UI hint for how the study would prefer that the input field is displayed to the user.
promptA 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 theRSDFormDataType.BaseTypeassociated with this input field to decode a list ofRSDChoiceObjectobjects with the appropriateValuetype.Throws
DecodingErrorif there is a decoding error.Declaration
Swift
public required init(from decoder: Decoder) throwsParameters
decoderThe decoder to use to decode this instance.
-
Encode the result to the given encoder.
Throws
EncodingErrorDeclaration
Swift
override open func encode(to encoder: Encoder) throwsParameters
encoderThe encoder to use to encode this instance.
View on GitHub
RSDMultipleComponentInputFieldObject Class Reference