RSDMultipleComponentInputFieldObject
open class RSDMultipleComponentInputFieldObject : RSDInputFieldObject, RSDMultipleComponentOptions
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 private(set) var choices: [[RSDChoice]] { get }
-
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? { get }
-
The default answer associated with this option set.
Declaration
Swift
open private(set) var defaultAnswer: Any? { get }
-
Default initializer.
Declaration
Swift
public init(identifier: String, choices: [[RSDChoice]], baseType: RSDFormDataType.BaseType, separator: String? = nil, uiHint: RSDFormUIHint? = nil, prompt: String? = nil, defaultAnswer: Any? = 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.
-
This is a required initializer for copying, but the choices will be an empty array.
Declaration
Swift
public required init(identifier: String, dataType: RSDFormDataType)
-
Declaration
Swift
override open func copyInto(_ copy: RSDInputFieldObject)
-
Initialize from a
Decoder
. This method uses theRSDFormDataType.BaseType
associated with this input field to decode a list ofRSDChoiceObject
objects with the appropriateValue
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.