RSDTextInputTableItem

open class RSDTextInputTableItem : RSDInputFieldTableItem

RSDTextInputTableItem is used to represent a single row in a table that holds a text entry input field. Typically, this would be used to represent a single RSDInputField value, but it can also be used to represent a single component in a multiple-component field.

  • The text field options for this input.

    Declaration

    Swift

    open private(set) var textFieldOptions: RSDTextFieldOptions? {
      get
      }
  • The placeholder text for this input.

    Declaration

    Swift

    open private(set) var placeholder: String? {
      get
      }
  • The formatter used for dislaying answers and converting text to a number or date.

    Declaration

    Swift

    open private(set) var formatter: Formatter? {
      get
      }
  • The picker data source for picking an answer using a custom keyboard.

    Declaration

    Swift

    open private(set) var pickerSource: RSDPickerDataSource? {
      get
      }
  • The answer type for this component of the answer result.

    Declaration

    Swift

    public let answerType: RSDAnswerResultType
  • Initialize a new RSDInputFieldTableItem. parameters: - rowIndex: The index of this item relative to all rows in the section in which this item resides. - inputField: The RSDInputField representing this tableItem. - uiHint: The UI hint for this row of the table. - answerType: The answer type. - textFieldOptions: The text field options. - formatter: The formatter used for dislaying answers and converting text to a number or date. - pickerSource: The picker data source for selecting answers.

    Declaration

    Swift

    public init(rowIndex: Int, inputField: RSDInputField, uiHint: RSDFormUIHint, answerType: RSDAnswerResultType = .string, textFieldOptions: RSDTextFieldOptions? = nil, formatter: Formatter? = nil, pickerSource: RSDPickerDataSource? = nil, placeholder: String? = nil)
  • The answer for this input field or component of a multiple component input field.

    Declaration

    Swift

    open override var answer: Any? { get }
  • The text string to display as the answer.

    Declaration

    Swift

    open var answerText: String? { get }
  • The text string to display for a given answer.

    Declaration

    Swift

    open func answerText(for answer: Any?) -> String?
  • Set the new answer value. This will throw an error if the value isn’t valid. Otherwise, it will set the answer.

    Throws

    RSDInputFieldError if the answer is invalid.

    Declaration

    Swift

    public final func setAnswer(_ newValue: Any?) throws

    Parameters

    newValue

    The new value for the answer.

  • Convert the input answer into a validated answer of a supported type, or throw an error if it fails validation.

    Declaration

    Swift

    open func validatedAnswer(_ newValue: Any?) throws -> Any?

    Parameters

    newValue

    The new value for the answer.

    Return Value

    The converted answer.

  • Convert the input answer into a validated answer of a supported type, or throw an error if it fails validation.

    Declaration

    Swift

    open func convertAnswer(_ newValue: Any) throws -> Any?

    Parameters

    newValue

    The new value for the answer.

    Return Value

    The converted answer.