form

The WebForm interface represents an interactive web form, which is a form being executed by an online user. This is the root object for an interactive form and provides access to elements within the form. It also provides many methods to control form processing e.g. gotoPage(), callForm(), callUrl(), generatePdf() etc.

form Properties

HTTP_PROTOCOL_GET Represents the http GET protocol, for use with the callUrl and gotoUrl methods.
HTTP_PROTOCOL_POST Represents the http POST protocol, for use with the callUrl and gotoUrl methods.

form Functions

getAbortPage myform.getAbortPage( ) Returns the current page after a failure has occurred, or null if no failure has occurred or there is no current page.
addFinalPageMessage myform.addFinalPageMessage( message ) Adds a message that will be displayed to the user on the form's final page.
addFinalPageMessage myform.addFinalPageMessage( messageNo , replaceParameters ) Adds a message that will be displayed to the user on the form's final page.
addFinalPageMessageText myform.addFinalPageMessageText( text , replaceParameters ) Adds a message that will be displayed to the user on the form's final page.
getAllPages myform.getAllPages( ) Returns an array of Page objects containing all pages within the form.
isBackButtonSupported myform.isBackButtonSupported( ) Returns true if use of the back button is supported for the current form.
isBackground myform.isBackground( ) Returns true if this form is running in background e.g.
isCalledForm myform.isCalledForm( ) Returns true if this form has been called from another form using method #callForm(String, Map).
callForm myform.callForm( formName [, parameters ] ) Calls the form with the specified name and displays any resulting HTML page to the user.
getCallingFormName myform.getCallingFormName( ) Returns the name of the calling form or null if no calling form exists.
callUrl myform.callUrl( url , parameters [, httpProtocol ] ) Calls the specified URL and displays any resulting HTML page to the user.
getControls myform.getControls( ) Returns the Controls object that gives access to all controls available to the form.
getCurrentPage myform.getCurrentPage( ) Returns a Page object representing the current page
displayUrl myform.displayUrl( url [, popup , popupWindowName ] ) Displays the specified URL in the user's browser, optionally in a pop-up browser window.
getFirstPage myform.getFirstPage( ) Returns the Page object configured as the form's first page.
generatePdf myform.generatePdf( ) Generates a PDF for the current page and displays this to the user in a popup window.
generatePdf myform.generatePdf( options ) Generates a PDF from one or more pages, with options to display to the user and save the generated file.
getControlsByModifier myform.getControlsByModifier( modifier ) Returns an array of controls in the form that have the named modifier.
gotoForm myform.gotoForm( formName [, parameters ] ) Transfers control to the form with the specified name, terminates execution of the current form and commits the current transaction.
gotoPage myform.gotoPage( page ) Goes immediately to the specified page and terminates the event currently being executed; no statements past this method call will be executed.
gotoUrl myform.gotoUrl( url , parameters [, httpProtocol ] ) Displays the specified URL in the user's browser, terminates execution of the current form and commits the current transaction.
isLoadedByServiceWorker myform.isLoadedByServiceWorker( ) Returns true if this form is being loaded by a client Javascript service worker.
getNextPage myform.getNextPage( ) Returns a Page object representing the next page or null if no next page is configured.
setNextPage myform.setNextPage( page ) Sets the next page to be displayed when the user navigates forwards using a next page button.
getPages myform.getPages( ) Returns the Pages object that gives access to all pages available to the form.
getPresentationTemplateName myform.getPresentationTemplateName( ) Returns the name of the presentation template currently used or null if no presentation template is configured.
setPresentationTemplateName myform.setPresentationTemplateName( templateName ) Changes the Presentation Template used by the current form to the one with the specified name.
getPresentationTemplatePath myform.getPresentationTemplatePath( ) Returns the path of the presentation template currently used or null if no presentation template is configured.
setPresentationTemplatePath myform.setPresentationTemplatePath( templatePath ) Changes the Presentation Template used by the current form to the one at the specified path.
getPreviousPage myform.getPreviousPage( ) Returns a Page object representing the previous page displayed or null if there is no previous page.
getProject myform.getProject( ) Returns the current project for the running form
returnFromForm myform.returnFromForm( ) Returns from a called form to the calling form.
getReturnUrl myform.getReturnUrl( ) Returns a Url for use with the callUrl() method.
getTheme myform.getTheme( ) Returns the path of the theme currently used or null if no theme is configured.
setTheme myform.setTheme( theme ) Changes the Theme used by the current form to the one at the specified path.
uploadFileFromBrowser myform.uploadFileFromBrowser( [options ] ) Displays a special upload page to the user to allow the user to upload one or more files to the server, with UploadOptions to override some of the default parameters.
useFormTheme myform.useFormTheme( ) Change the current Form so it uses its configured Theme.
usePresentationTemplate myform.usePresentationTemplate( ) Change the current Form so it uses its configured Presentation Template.
useProjectTheme myform.useProjectTheme( ) Change the current Form so it uses its Project's configured Theme.
isUseProjectTheme myform.isUseProjectTheme( ) Returns true if the form uses the project's theme.

BaseForm Functions

abort myform.abort( message ) Aborts execution of the current form, integration service or workflow node and rolls back the current transaction.
getAbortMessage myform.getAbortMessage( ) Returns the abort message after a failure has occurred.
getFields myform.getFields( ) Returns the Fields object that gives access to all fields available to the form.
getLanguage myform.getLanguage( ) Returns the language code for the user session.
setLanguage myform.setLanguage( language ) Sets the language code for the user session.
getResources myform.getResources( ) Returns the Resources object that gives access to all resources available to the form.
getTables myform.getTables( ) Returns the Tables object that gives access to all tables available to the form.
getTexts myform.getTexts( ) Returns the Texts object that gives access to all texts available to the form.
getTimezone myform.getTimezone( ) Returns the time zone used for the form.
setTimezone myform.setTimezone( timezone ) Sets the time zone for the current form, service or workflow process.

MessageContainer Functions

addErrorMessage myform.addErrorMessage( message [, stopProcessing ] ) Adds an error message that will be displayed to the user.
addErrorMessage myform.addErrorMessage( messageNo [, replaceParameters ] [, stopProcessing ] ) Adds an error message that will be displayed to the user.
addErrorMessageText myform.addErrorMessageText( text [, replaceParameters ] [, stopProcessing ] ) Adds an error message that will be displayed to the user, sourced from an existing text.
addInfoMessage myform.addInfoMessage( message [, stopProcessing ] ) Adds an information message that will be displayed to the user.
addInfoMessageText myform.addInfoMessageText( text [, replaceParameters ] [, stopProcessing ] ) Adds an info message that will be displayed to the user, sourced from an existing text.
addWarningMessage myform.addWarningMessage( message [, stopProcessing ] ) Adds a warning message that will be displayed to the user.
addWarningMessage myform.addWarningMessage( messageNo [, replaceParameters ] [, stopProcessing ] ) Adds a warning message that will be displayed to the user.
addWarningMessageText myform.addWarningMessageText( text [, replaceParameters ] [, stopProcessing ] ) Adds a warning message that will be displayed to the user, sourced from an existing text.
existErrorMessages myform.existErrorMessages( ) Returns true if undisplayed error messages exist for this element, otherwise returns false.
existInfoMessages myform.existInfoMessages( ) Returns true if undisplayed info messages exist for this element, otherwise returns false.
existMessages myform.existMessages( ) Returns true if undisplayed info, warning or error messages exist for this element, otherwise returns false.
existWarningMessages myform.existWarningMessages( ) Returns true if undisplayed warning messages exist for this element, otherwise returns false.

Element Functions

getElementName myform.getElementName( ) Returns the element name
getElementType myform.getElementType( ) Returns the element type