evCreate API 5.7 Help

ShowForm Function

Displays a custom pop-up dialog with given contents and title in the Canvas Envision Creator web app and returns the data that a user has provided in that dialog.

ShowForm( formHtml: string, title: string, confirmLabel?: string, cancelLabel?: string, formStyles?: string ): Promise<[[[EvCreateFormResult|evcreateformresult-interface.html]]]>

Parameters

formHtml: string

A string, given contents of the custom pop-up dialog in the form of HTML.

The dialog contents can include any HTML elements, including form input elements, such as fields, checkboxes, radio buttons, and so on.

To retrieve the user-input data from an input element, it should have an id attribute with a value constructed according to the following template:

  • ev-form-id-your-element-id

For example: id='ev-form-id-part-no'.

The your-element-id suffix defines the key of the input element in the key-value data returned from the dialog. The ev-form-id- prefix is stripped from such a key; for example, {"part-no" => "1234567890"}.

title: string

A string, a given title of the custom pop-up dialog.

confirmLabel?: string

A string, a custom label for the Confirm button in the custom pop-up dialog.

cancelLabel?: string

A string, a custom label for the Cancel button in the custom pop-up dialog.

formStyles?: string

A string, custom CSS styles for the custom pop-up dialog.

Return value

Promise<EvCreateFormResult>

A Promise that, if fulfilled, resolves to an EvCreateFormResult object that contains the data provided by a user in the custom pop-up dialog.

Discussion

Script execution is paused until the user dismisses the popped-up custom dialog with the Confirm or Cancel button.

01 May 2025