Namespace: customFunctions

FormView~ customFunctions

Contains custom functions which can be used in the rule editor.

Members


<static> toObject

Converts a JSON string to an object.


<static> externalize

Prefixes the URL with the context path.


<static> validateURL

Validates if the given URL is correct.


<static> defaultErrorHandler

Default error handler for the invoke service API.


<static> defaultSubmitSuccessHandler

Handles the success response after a form submission.


<static> defaultSubmitErrorHandler

Handles the error response after a form submission.


<async, static> fetchCaptchaToken

Fetches the captcha token for the form.

This function uses the Google reCAPTCHA Enterprise service to fetch the captcha token.


<static> dateToDaysSinceEpoch

Converts a date to the number of days since the Unix epoch (1970-01-01).

If the input date is a number, it is assumed to represent the number of days since the epoch, including both integer and decimal parts. In this case, only the integer part is returned as the number of days.


<static> downloadDoR

Downloads the Document of Record (DoR) for the form.


<static> exportFormData

Export form data as a JSON string

Methods


<static> navigateTo(destinationURL, destinationType)

Navigates to the specified URL.

Parameters:
Name Type Description
destinationURL string

The URL to navigate to. If not specified, a new blank window will be opened.

destinationType string

The type of destination. Supports the following values: "_newwindow", "_blank", "_parent", "_self", "_top", or the name of the window.

Returns:
  • The newly opened window.
Type
Window