SMIPreChatField

Objective-C

@protocol SMIPreChatField

Swift

protocol PreChatField

Represents a pre-chat field.

  • The conversation ID, which is used to associate all messages and events with a given conversation.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) NSString *_Nonnull identifier;

    Swift

    var identifier: String { get }
  • The pre-chat field type.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) SMIPreChatFieldTypes _Nonnull type;

    Swift

    var type: PreChatFieldTypes { get }
  • The pre-chat field label.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull label;

    Swift

    var label: String { get }
  • The pre-chat field name.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull name;

    Swift

    var name: String { get }
  • Indicates whether the pre-chat field is required.

    Declaration

    Objective-C

    @property (nonatomic, readonly, getter=isRequired) BOOL required;

    Swift

    var isRequired: Bool { get }
  • The maximum length for this pre-chat field.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSUInteger maxLength;

    Swift

    var maxLength: UInt { get }
  • The sequence order of this pre-chat field.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSUInteger order;

    Swift

    var order: UInt { get }
  • The value of this pre-chat field.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSString *value;

    Swift

    var value: String? { get set }
  • Indicates whether the pre-chat field is hidden.

    Declaration

    Objective-C

    @property (nonatomic, readonly, getter=isHidden) BOOL isHidden;

    Swift

    var isHidden: Bool { get }
  • Validates the pre-chat field.

    Declaration

    Objective-C

    - (SMIPreChatErrorTypes)validate;

    Swift

    func validate() -> PreChatErrorTypes