FormField
@available(*, deprecated, renamed: "MessageFormItem", message: "This method is deprecated in 4.21.0")
open class FormField: NSObject, Codable, NSCopying
Input field data information.
Since
4.14.1-
Unique key of field
Declaration
Swift
public let fieldKey: String
-
Title
Declaration
Swift
public let title: String
-
Input type
Declaration
Swift
public let inputTypeValue: String
-
Indicate whether the field is required or not
Declaration
Swift
public let required: Bool
-
Regular expressions for validation
Declaration
Swift
public let regex: String?
-
Placeholder
Declaration
Swift
public let placeholder: String?
-
Field to store the data to be submitted. Memory-cache reserved property for answer.
Declaration
Swift
public var temporaryAnswer: String?
-
constructor
Declaration
Swift
public init( fieldKey: String, title: String, inputTypeValue: String, required: Bool, regex: String? = nil, placeholder: String? = nil )
-
Default constructor.
Declaration
Swift
required public init(from decoder: Decoder) throws
Parameters
decoder
Decoder
instance -
Encodes this object.
Declaration
Swift
public func encode(to encoder: Encoder) throws
Parameters
encoder
Encoder
instance -
Copies this object
Declaration
Swift
public func copy(with zone: NSZone? = nil) -> Any
Parameters
zone
optional
NSZone
Return Value
FormField
instance
-
Input type value
Declaration
Swift
public var inputType: InputType
-
Returns whether it matches the regular expression.
Declaration
Swift
public var isValid: Bool
-
Returns whether the field is in a submittable state
Declaration
Swift
public var isSubmittable: Bool