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 title
string | object title of the modal, if this is an object then it will be used as the fields value
fields
object object of fields to use, eg:
fieldName: { label: "Say something", type: "textbox", value: "hello" }
onComplete
function Completion callback
okLabel
string | undefined The label for the OK button
cancelLabel
string | 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