Reference Source
public class | source

BaseFormField

Extends:

superClass → BaseFormField

The base element for Form Field components. If not extending a HTMLInputElement, following properties should be implemented at least :

  • disabled. Whether this field is disabled or not.
  • invalid. Whether the current value of this field is invalid or not.
  • name. Name used to submit the data in a form.
  • readOnly. Whether this field is readOnly or not. Indicating that the user cannot modify the value of the control.
  • required. Whether this field is required or not.
  • value. This field's current value.

Member Summary

Public Members
public

Reflects the aria-describedby attribute to the labellable element e.g.

public

Whether the current value of this field is invalid or not.

public

Reflects the aria-label attribute to the labellable element e.g.

public

Reference to a space delimited set of ids for the HTML elements that provide a label for the formField.

Method Summary

Public Methods
public

clear()

Clears the value of formField to the default value.

public

reset()

Resets the value to the initial value.

Public Members

public describedBy: String source

Reflects the aria-describedby attribute to the labellable element e.g. inner input.

  • null by default.

public invalid: Boolean source

Whether the current value of this field is invalid or not.

  • false by default.
  • reflected

public labelled: String source

Reflects the aria-label attribute to the labellable element e.g. inner input.

  • null by default.

public labelledBy: String source

Reference to a space delimited set of ids for the HTML elements that provide a label for the formField. Implementers should override this method to ensure that the appropriate descendant elements are labelled using the aria-labelledby attribute. This will ensure that the component is properly identified for accessibility purposes. It reflects the aria-labelledby attribute to the DOM.

  • null by default.

Public Methods

public clear() source

Clears the value of formField to the default value.

public reset() source

Resets the value to the initial value.