FWFormModel

struct FWFormModel
extension FWFormModel: Codable

Data structure for the form.

  • id

    The UUID of the component.

    Declaration

    Swift

    let id: String
  • The title of the form.

    Declaration

    Swift

    let title: String
  • The format that the form response will have.

    Declaration

    Swift

    let responseFormat: ResponseFormats
  • A collection of component’s data structure contained in this form.

    Declaration

    Swift

    let components: [FWComponentModel]
  • Style specification of the form.

    Declaration

    Swift

    let style: FWStyleSpecification
  • Form response formats

    See more

    Declaration

    Swift

    enum ResponseFormats : String, Codable
  • Creates a new FWFormModel by decoding from the given decoder.

    This initializer throws an error if reading from the decoder fails, or if the data read is corrupted or otherwise invalid.

    Declaration

    Swift

    init(from decoder: Decoder) throws

    Parameters

    decoder

    The decoder to read data from.

  • Encodes this value into the given encoder.

    If the value fails to encode anything, encoder will encode an empty keyed container in its place.

    This function throws an error if any values are invalid for the given encoder’s format.

    Declaration

    Swift

    func encode(to encoder: Encoder) throws

    Parameters

    encoder

    The encoder to write data to.