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.
Parameters
formHtml: stringA 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
idattribute 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-idsuffix defines the key of the input element in the key-value data returned from the dialog. Theev-form-id-prefix is stripped from such a key; for example,{"part-no" => "1234567890"}.title: stringA string, a given title of the custom pop-up dialog.
confirmLabel?: stringA string, a custom label for the Confirm button in the custom pop-up dialog.
cancelLabel?: stringA string, a custom label for the Cancel button in the custom pop-up dialog.
formStyles?: stringA string, custom CSS styles for the custom pop-up dialog.
Return value
Promise<EvCreateFormResult>A Promise that, if fulfilled, resolves to an
EvCreateFormResultobject 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.