Fieldset

public final class Fieldset : GenericElement

Fieldset tag element class

### Usage Example: ###

  let fieldset = Fieldset()

  let labelName = Label("Name")
  labelName.addAttribute(("for", "nameField"))
  fieldset.add(labelName)

  let inputName = InputText("", id: "nameField", placeholder: "Name")
  fieldset.add(inputName)

  let labelAge = Label("Age Range")
  labelAge.addAttribute(("for", "ageRangeField"))
  fieldset.add(labelAge)
  • tag

    Override tag element for element. Default is fieldset

    Declaration

    Swift

    override var tag: String { get }
  • Override container element defaults is true

    Declaration

    Swift

    override var container: Bool { get }
  • This method append a new element in objects list

    Declaration

    Swift

    public func add(_ element: ElementProtocol)

    Parameters

    element