STRUCT

SelectFormField

Contents

public struct SelectFormField: FormField, OptionalValueString

A form field that provides a set of options to be presented to the user.

Properties

name

public let name: String

label

public let label: Message?

placeholder

public let placeholder: Message?

options

public let options: [Option]

The options available for user selection.

value

public let value: String?

The current value of the selected option, if any.

Methods

init(from:)

public init(from decoder: Decoder) throws

Parameters

Name Description
decoder The decoder to read data from.

encode(to:)

public func encode(to encoder: Encoder) throws

Parameters

Name Description
encoder The encoder to write data to.

==(::)

public static func == (lhs: SelectFormField, rhs: SelectFormField) -> Bool

Returns a Bool value that indicates whether the receiver and a given object are equal.