TX Text Control .NET Server

Forms Class

Class

Description

Reads and validates form fields and controls form-field interaction.

Syntax

Forms

Examples

The following example demonstrates Forms in a practical Document Viewer workflow. This object provides functionalities for working with forms and form fields.

const formIsComplete = TXDocumentViewer.forms.validate();
const formValues = TXDocumentViewer.forms.getValues();
console.log({ formIsComplete, formValues });

Members

Properties

PropertyDescription
EventsForm event names accepted by addEventListener().

Methods

MethodDescription
activateEnables form-field interaction.
addEventListenerAdds a DOM event listener to every current form field.
deactivateDisables form-field interaction.
getValuesReturns the current value, name, type, and identifier of each form field.
removeEventListenerRemoves a DOM event listener from every current form field.
showFormsBarShows or hides the form navigation bar. If no form bar is available, no action is taken.
validateValidates all current form fields and scrolls to the first invalid field.

Enumerations

EnumerationDescription
EventsNames of DOM events raised by form fields.