Core function
Syntax
prompt( message[, inputDefaults] )
Parameters
Parameter | Description |
---|---|
message | String message to display. |
inputDefaults | A string or integer representing the default value of the input field. |
Description
Displays a prompt dialog box with a message and an input field that receives user input. Returns the user input if 'OK' was pressed, null if dialog was canceled.
![]() | Form API versions < 2.1: the function returned inputDefaults if dialog was canceled. |