The modal SDK
Methods
-
require("ko/modal").open(title, fields, onComplete, okLabel, cancelLabel)
-
Open a modal dialog with the given contents
Parameters:
Name Type Description titlestring | object title of the modal, if this is an object then it will be used as the fields value
fieldsobject object of fields to use, eg:
fieldName: { label: "Say something", type: "textbox", value: "hello" }onCompletefunction Completion callback
okLabelstring | undefined The label for the OK button
cancelLabelstring | undefined The label for the Cancel button
Returns:
Returns an object with key and value being the field key and the entered value, eg.
{fieldName: "hello"}- Type
- object