A simple class for creating HTML forms.

MaxForm

Constructors

Properties

body: HTMLElement

Holds the DOM node that represents the tbody (table body). New rows can be added to this object using DOM API.

table: HTMLTableElement

Holds the DOM node that represents the table.

Methods

  • Helper method to add an OK and Cancel button using the respective functions.

    Parameters

    • okFunct: Function
    • cancelFunct: Function

    Returns void

  • Adds a checkbox for the given name and value and returns the textfield.

    Parameters

    • name: string
    • value: boolean

    Returns HTMLInputElement

  • Adds a combo for the given name and returns the combo.

    Parameters

    • name: string
    • isMultiSelect: boolean
    • Optionalsize: number

    Returns HTMLSelectElement

  • Adds a new row with the name and the input field in two columns and returns the given input.

    Parameters

    • name: string
    • input: Element

    Returns Element

  • Adds an option for the given label to the specified combo.

    Parameters

    • combo: HTMLElement
    • label: string
    • value: any
    • OptionalisSelected: boolean

    Returns void

  • Adds an input for the given name, type and value and returns it.

    Parameters

    • name: string
    • value: any
    • type: string = 'text'

    Returns HTMLInputElement

  • Adds a textarea for the given name and value and returns the textarea.

    Parameters

    • name: string
    • value: string
    • rows: number

    Returns HTMLTextAreaElement

  • Returns the table that contains this form.

    Returns HTMLTableElement