Interface FormElement

All Superinterfaces:
Element, EventTarget, Node, SearchContext

public interface FormElement extends Element
An HTML DOM form element.

Provides access to the contained control elements and the attributes of the form element.

  • Method Details

    • action

      String action()
      Returns the value of the action attribute of this form. May return an empty string if there is no action attribute.
      Throws:
      ObjectClosedException - when this instance is closed
    • name

      String name()
      Returns the value of the name attribute of this form. This method can return an empty string if the name attribute does not exist.
      Throws:
      ObjectClosedException - when this instance is closed
    • method

      String method()
      Returns the value of the method attribute of this form. This method can return an empty string if the method attribute does not exist.
      Throws:
      ObjectClosedException - when this instance is closed
    • reset

      void reset()
      Restores default values of the elements on the form. It performs the same action as a reset button.
      Throws:
      ObjectClosedException - when this instance is closed
    • submit

      void submit()
      Submits the form represented by the element.
      Throws:
      ObjectClosedException - when this instance is closed
    • controls

      Returns an immutable list of the form controls or an empty list if the form got no controls on it.
      Throws:
      ObjectClosedException - when this instance is closed