STRUCT

SelectFormField.Option

Contents

public struct Option: Codable, Equatable

An option to be presented to the user.

Properties

label

public let label: Message

The label describing the option.

value

public let value: String

The value of the option.

selected

public let selected: Bool

Whether the option is selected by default. If no value is supplied for a SelectFormField when submitting the a form, then the value of the selected option is used, 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.