Skip to content

Z.Prompt

The Z.Prompt object requests a text value from the user.

For more information about accepting keyboard entry from a user see Getting Keyboard Input.

var myprompt = Z.Prompt({
title: "Hello",
text: "Please enter your name:",
defaultValue: "Dog",
maxLength: 12,
filterProfanity: true
});
myprompt.on("confirm", function(theirName) {
console.log("They entered: " + theirName);
});
myprompt.on("cancel", function() {
console.log("They cancelled the dialog :-(");
});
myprompt.show();