GeezerVison is showing maxgraph.github.io — MaxForm | @maxgraph/core
A simple class for creating HTML forms.
Constructors
constructor
-
new MaxForm(className: string): MaxForm
Properties
body
body: HTMLElement
Holds the DOM node that represents the tbody (table body). New rows
can be added to this object using DOM API.
table
table: HTMLTableElement
Holds the DOM node that represents the table.
Methods
addButtons
-
addButtons(okFunct: Function, cancelFunct: Function): void
Helper method to add an OK and Cancel button using the respective
functions.
Parameters
- okFunct: Function
- cancelFunct: Function
Returns void
addCheckbox
-
addCheckbox(name: string, value: boolean): HTMLInputElement
Adds a checkbox for the given name and value and returns the textfield.
Parameters
- name: string
- value: boolean
Returns HTMLInputElement
addCombo
-
addCombo(name: string, isMultiSelect: boolean, size?: number): HTMLSelectElement
Adds a combo for the given name and returns the combo.
Parameters
- name: string
- isMultiSelect: boolean
Optionalsize: number
Returns HTMLSelectElement
addField
-
addField(name: string, input: Element): Element
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
addOption
-
addOption( combo: HTMLElement, label: string, value: any, isSelected?: boolean,): void
Adds an option for the given label to the specified combo.
Parameters
- combo: HTMLElement
- label: string
- value: any
OptionalisSelected: boolean
Returns void
addText
-
addText(name: string, value: any, type?: string): HTMLInputElement
Adds an input for the given name, type and value and returns it.
Parameters
- name: string
- value: any
- type: string = 'text'
Returns HTMLInputElement
addTextarea
-
addTextarea(name: string, value: string, rows: number): HTMLTextAreaElement
Adds a textarea for the given name and value and returns the textarea.
Parameters
- name: string
- value: string
- rows: number
Returns HTMLTextAreaElement
getTable
-
getTable(): HTMLTableElement
Returns the table that contains this form.
Returns HTMLTableElement
On This Page
Constructors
Properties
Methods